Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking combo box lookup values to other combo box values

Status
Not open for further replies.

bphillips

Technical User
Feb 18, 2003
13
US
On a form I have two bound combo boxes. I want to limit values displayed in the second combo box based on the user selection from the first combo box. The field (field A)that the first combo box is bound to is the primary key of table A. Table A is related to table B via this field in a one-to-many relationship. The second combo is bound to another field (field B) in table B. After the user selects a value from the first combo box (x), I would like the second combo box to only display values in field B of records in table B with a value of x in field A of the same record.
 
just to get you started:

make field b's record source something like:

Select <fieldname> from <TableName> where <fieldname> = Forms![FormName]![ComboA_ControlName]

then, in the after update event for ComboA, requery ComboB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top