Saving info into more than 1 table

DeeDee77

Registered User.
Local time
Today, 20:40
Joined
Jan 24, 2002
Messages
21
I have a form with around 20 fields, but I need to save the info. that is entered by the user to be saved into 3 different tables when the Add Record button is clicked. Some, but not all, of the fields go into each one. Is there any way to do this? I was thinking of using recordsets, but it keeps giving me a type mismatch error. Thanks!!
 
To save info from a form on separate tables, use a query as the recordsource for the form adding whichever fields you want to the query.
In general, it is not good practice to store the same information more than once in a Db. If the same info is being stored in more than one place, it is likely that your Db structure is not ideal. Post what you are trying to do and the general purpose of your Db. You will likely get some advice on better structural management.
 
There are 3 tables: Applicant, Application, and Apply_To. The information that the user types into the Main form is stored in these tables, but no 2 fields are stored more than once. Say there are 20 fields, 7 are stored in applicant (name, address, city, etc.), 5 are stored in application (internal/external, date sent, offer date, etc.) and 8 are stored in Apply_to (Position Announcement #, Job Code, Location, etc.). All 3 tables are linked by a field called Applicant_ID. I don't know if this makes the task any clearer or not. Thanks for any help!!
 
I can see why you would need two tables but I'm not sure about the third. An applicant can apply more than once. So Applicant has a 1-to-many relationship with Application. But, Apply_To seems to relate 1-to-1 with Application.

To properly handle a 1-to-many relationship, you should use a main form for the Applicant information and a subform for the Application/Applied_To information.
 

Users who are viewing this thread

Back
Top Bottom