Form that allows entry into multiple tables (How To)

Access_Headaches

Registered User.
Local time
Today, 13:46
Joined
Jun 17, 2010
Messages
28
I'm trying to figure out how to make a form that would allow me to enter data and then choose what table I would like the data to be entered into.

This way, people do not need to open and close all three of our forms to enter there daily specific data.
 
Are the three forms identical in every way except for the record source?

Do the three separate tables have exactly the same structure including exactly the same field names?
 
Yes, they all have the same fields in the structure, they just are not all used on every table.
 
This design doesn't sound like it is a normalized design. Why would you have 3 tables with the same structure?
 
You can affect the record source of the form directly using VBA. Add three command buttons to your form, one for each table. In the and click event procedure of the command button have something like:

Me.RecordSource = "tbl1”
Me.Requery

Where tbl1 refers to one of the tables that you want to access.
You will also need to add similar code to the other command buttons for the other two tables.
 

Users who are viewing this thread

Back
Top Bottom