Combo Box Problems

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

Guest

Access 2002

I have a company table, a contact table and an orders table.

I use the orders table for my form.

On my form I have a combo box that looks up the company name from the
company table.

I have another combo box that looks up from the contacts table.

I need the contacts combo box to show only the contacts for the company
chosen in the company combo box. Then I need the discount for the contact
chosen to appear in another field on the form.

Any help out there is greatly appreciated!
 
Jenn,
Use the Company combo (ex. cboCompany) to filter the records returned by
the Contacts combo (ex. cboContacts).
In the query behind your cboContacts combo, include the Company field in
the query, and use this criteria for Company...
=Forms!YourFormName!cboCompany
That way the Contacts combo will only return Contacts for the Company in
cboCompany.
hth
Al Camp
 
Thank you for the response. This is not working either I think because the
company field is reading as a number and the contact company field is text.
I just don't know how to fix this.
 
Jenn,
What I gave you should work, so I'm thinking you have some other problem.
(you used your own control names didn't you?)

Post back with all the info about the fields in your table that are
involved here, the fields in the Company combo, what is the combo column
setup, and the combo properties. (columns,bound column, etc..)

Are you selecting a Company ID number, or a Company name. Most probably
you should be selecting a company ID.

Whatever field is the ControlSource for the Company combo, that's the
field that has to be filtered in Contacts.

We'll need to dig a little deeper... but hang in there...
hth
Al Camp
 
Back
Top