I'm new to programming in access and I am stuck on a problem. I have created a search form that will find an employee. Once you find the employee, you double-click the name and it opens that employee into a new form and displays the person's name and ID. That form's record source is the query that finds the employee. Now that I have the employee opened onto the new form the user must enter a few pieces of data. I have created a button to save the data, but I want to save it into a different table from what the form's record source is. I need some code that will allow me to set a new recordsource and save the data entered into a different table. Anyone have any ideas?
saving records
Collapse
X
-
First problem is that if you don't want the edited record saved back to source then binding the form to source is a problem as changes could be saved without you realising. You would be better off using an unbound form and populating the textboxes with the values from those fields rather than opening the record source.
Secondly, saving the data to a second table sounds like you have some serious design issues. Rarely is there a legitimate reason for storing the same table data twice. It sounds more like a nightmare.
To answer your original question the only way to do this would be to run an INSERT query in code. Building it dynamically using the controls on the form.
Comment