Hello-
My goal is to use a form to prompt a query and open up a report.
What I would like on the form is to have a combo box to select one of three
tables. Then, have a second combo box appear with the fields from the
selected table to choose from.
For simplicity purposes, let's call the forms -
form1 with fields - field11, field12, field13
form2 with fields - field21, field22, field23
form3 with fields - field31, field32, field33
What would be the best approach for accomplishing this?
Thanks in advance for your help!!!
Jeanette Cunningham - 23 May 2008 11:34 GMT
buscher75,
you could use a select case statement for the after update event of the
first combo.
Select case Me.NameOfFirstCombo
Case "table1"
Me.NameOfSecondCombo.RowSource = "qry1"
Case "table2"
Me.NameOfSecondCombo.RowSource = "qry2"
Case "table3"
Me.NameOfSecondCombo.RowSource = "qry3"
End Select
Replace table'n' with your table names.
qry1 is the query with the appropriate fields for when user selects table1,
and so on for the other 2 choices.
Jeanette Cunningham -- Melbourne Victoria Australia
> Hello-
>
[quoted text clipped - 13 lines]
>
> Thanks in advance for your help!!!