Combo populating a combo

dsellers1

Registered User.
Local time
Today, 14:50
Joined
May 19, 2009
Messages
39
What am I missing? I am trying to populate options for one combo box based off of another. I have been reading through these threads to figure out what I am missing but can't seem to get it. You will see that based on the "Action" combo box, I want the "Place" combo box to automatically populate with the specific criteria in my Action table. It almost seems that I am missing what combo box my "Place" points to. I feel I covered that in my Row Source for that field but apparently not.
 

Attachments

The rowsource of your second combo box references [Forms]![Form1]![Place] but there is no control called 'Place' on Form1

Is Form1 supposed to be an unbound form?
 
Your action combo box should have

Column Count = 2
Column Width = 1;0

since the Row Source is table "Action"

Under the click event of the Action combobox you should have something like this.

Note: the control Place.Column(....) is the second combobox.

Code:
Private Sub Place_Click()

    Combo2.RowSource = "SELECT Action, Place FROM Action WHERE Place = '" & Place.Column(1, Place.ListIndex) & "'"
    Combo2.Requery

End Sub

For the Place combo box, set the properties to

Column Count = 2
Column Width = 1";1"

you should see the Place combobox filtered when selecting a criteria from the Action combo box.

EZ
 

Users who are viewing this thread

Back
Top Bottom