form prob!

Lyndseyd

Registered User.
Local time
Today, 22:08
Joined
Jul 6, 2005
Messages
71
Hi, i have created two tables, containing the same fields. One table if for '1 day tests' and the other is for '2 day tests'. I need to keep these two in seperate tables.

At the moment i have two seperate forms, one for each type of test, but as the fields are all the same, i was wondering if i had a combo box, so the user could choose whether they wanted a one day or two day test and filled in the rest of the fields, the record would then be stored in the appropriate table. Ie 2 day test table, if the chose 2 day test on the combo box

Thanx
 
You only need one table with a field for "TestType" - this table would have a foreign key (an IDNo) linked to the person/object table that the test pertains to.

Col
 
Use a UNION query

Would a UNION query work as the source for the form?

Select 1 as Field1, Field2, Field3 from Table1
UNION
Select 2 as Field1, Field2, Field3 from Table2;

This will keep the tables separate but allow you to select 1 or 2 in Field1 and filter only the records from one of the tables.
 

Users who are viewing this thread

Back
Top Bottom