Forms

Lyndseyd

Registered User.
Local time
Today, 20:30
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
 
If you have to have 2 tables the same, then use a combo box to change the Record Source of the form.

e.g

In the combo box make the Row Source Type = Value List
In Row Source put the names of your tables tblOne;tblTwo

Name your combo cboSource

In the after update of your combo put:

Code:
Me.RecordSource = Me.cboSource

Me.Form.Requery

In the on open event of your form put this:


Code:
Me.RecordSource = "tblOne"
 
Thanx for your reply. Although, I have done this but in the combo box whichever option i choose, the records are both stored in table one. If i choose option one i was the record to be stored in table 1 and if i choose option 2 i want the record to be stored in table 2. I would be gratefull for any help you could give or could direct me somewhere where i can find it. Thanx :)
 
I can't understand how come it won't work for you.

Here is a sample & it works.
 
Last edited:
Which access is that...i only have 97 at work, where i am now and it say i cant open it :rolleyes:
 
Please stick to one post on the subject, we now have two threads on the same question, Col gave the correct answer your structure is incorrect
 

Users who are viewing this thread

Back
Top Bottom