Help with combo box.

mugman17

Registered User.
Local time
Today, 17:53
Joined
Nov 17, 2000
Messages
110
I have a table with two fields, Company ID and Contact. In some cases there can be up to 8 or 9 contacts with the same company ID.

On a seperate form, I would like to be able to have a combo box that shows all that certain companies contacts when another field is updated showing the ID number. I have used a query that looks up everything and the query runs fine. I think I am missing an event. I need the ID number from a combo box on the same form. Any ideas? Sorry if I make no sense..I'm just frustrated.
 
Not sure if your company Id is coming from a combobox or another field.

Presume you type ID into a test box and you want to see the contacts in a combo box.

When you set up the combobox the wizard will ask for table etc.
Table = Table with CompanyID and contact
Choose both fields.
Once it is designed goto properties and amend the RowSource field. The query builder should show up. In criteria for ID type =Val([Forms]![frmName]![txtBox]) {Val due to text number problem}
Now in the text box (txtBox) goto the Event tab and on change event goto code and type in me.cmbName.Requery
Should do the trick and can be amended to take info from any other control
HTH
Simon
 
Thanks Simon..works perfectly.
 

Users who are viewing this thread

Back
Top Bottom