How do I link two drop down boxes?

G

Guest

I don't know how to link two drop down boxe. If I choose one from a general
category I want the second box to list only the things pertaining to what I
choose in the first box.
 
F

fredg

I don't know how to link two drop down boxe. If I choose one from a general
category I want the second box to list only the things pertaining to what I
choose in the first box.

Leave the rowsource of the 2nd combo box blank.
Code the AfterUpdate event of the 1st combo box to fill the rowsource
of the 2nd. Something like this:

Combo2.Rowsource = "Select Instructors.InstructorID,
Instructors.InstructorName from Instructors Where Instructors.ClassID
= " & Me!ComboName & ";"

Change the table and field names as needed.
The above assumes ClassID is a Number datatype and the Combo1 bound
column is Number also.

The above will list only instructors who teach the same class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top