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!

linked combo box is empty

Status
Not open for further replies.

hlkelly

Technical User
Jul 11, 2003
108
US
I have an order form and cboContacts is empty after making a selection in cboCustomer. I am using the following code to link from cboCustomer:

SELECT contacts.contactid, contacts.contactname FROM contacts WHERE (((contacts.customerid)=forms!tblorders!cbocustomer)) ORDER BY contacts.contactname;

I have already entered form_current code: me.cbocontacts.enabled=false

cboCustomer_afterUpdate:
me.cbocontacts.enabled = true
me.cbocontacts.requery

Thanks for your help! Heather
 
Try something like this:

cboCustomer_Change()

me.cbocontacts.RowSource="SELECT contacts.contactid, contacts.contactname FROM contacts WHERE (((contacts.customerid)=" & forms!tblorders!cbocustomer & ")) ORDER BY contacts.contactname"

me.cbocontacts.Requery

This should work, if not,
I hope you get the idea of what I'm trying to say.

Sorry for the bad grammar.
Regards,
Carlos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top