One form for two tables

P

PHroGman

Help...

I want to use one form to enter data into 2 tables.

One table called Car1
One called car 2

All fields within the tables are the same except the model of the car. This
has a drop down field with 2 cars a and b. I want the information I enter
into the form to be sent to the correct table depending on weather u choose
car a or car b.

TIA
 
J

John Vinson

Help...

I want to use one form to enter data into 2 tables.

One table called Car1
One called car 2

All fields within the tables are the same except the model of the car. This
has a drop down field with 2 cars a and b. I want the information I enter
into the form to be sent to the correct table depending on weather u choose
car a or car b.

TIA

Consider changing your table design. This design is simply WRONG.

If you merely add a field Model to one of your Car tables, use an
Update query to populate it with that table's model, do the same for
the other car table, and then run an Append query to create ONE table
you'll be in much better shape.

John W. Vinson[MVP]
 
G

Guest

John is correct. Your table design is wrong, and will lead to many problems
in the future.

Do as John suggests. Add a field in one table called model. Insert the value
A to all the A model cars, the add all the records from your second table to
the first table and add the value B to the model field.

You then simply run queries an report etc on the one table, that select the
appropriate model.

That is get all the cars where model = 'A'.
Count all the cars where model = 'B'

etc

Then one form, one table data source, and all is good in the world.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top