displaying info based on selection from combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform with two combo boxes and I want the data displayed in the second box to be based on the selection from the first combo box. I am using a SQL statement in the record source with a WHERE statement to equate the two selections. This works fine when i open the subform on its own but when I open the main form where the subform is on a Tab control Page it no longer works. The subform is linked to the main form on an unique ID number. When I open the main form, I get a msg box asking me to enter a parameter value for the criteria statement. Any ideas?
 
Make sure the criteria in the SQL of your 2nd box is in
the format:

[forms]![frmNameOfForm]![cboCombo1]

Also, you may want to make sure there is an After Update
event in your 1st combo box that refreshes the 2nd if the
data is updated/changed:

Me.cboCombo2.Requery


-----Original Message-----
I have a subform with two combo boxes and I want the data
displayed in the second box to be based on the selection
from the first combo box. I am using a SQL statement in
the record source with a WHERE statement to equate the two
selections. This works fine when i open the subform on
its own but when I open the main form where the subform is
on a Tab control Page it no longer works. The subform is
linked to the main form on an unique ID number. When I
open the main form, I get a msg box asking me to enter a
parameter value for the criteria statement. Any ideas?
 
Back
Top