Combo box not showing correct value when changing records on a form

E

Eric

I have a form frmBids with two combo boxes showing a customer
(cboCustomer) and contacts for each customer (cboContacts). I got the
cboContacts to only show the contacts unique to the customer by using
a requery code on the AfterUpdate of cboCustomer. That works fine.
However, when I move between records only the contact shown on the
first record displays, it does not update on subsequent records. If I
go back and select the customer from cboCustomer it updates and
displays the correct contact, but then the next record just shows the
one I just selected. I verified that when I switch between records
without doing anything (just letting the first record's name display)
that the table data does not update. So it is obviously just a visual
thing, and while I can understand what is going on, I am not sure that
the end user of this database will. Is there anyway to fix that, so
when the end user flips through the records, the correct name displays
always?
 
F

fredg

I have a form frmBids with two combo boxes showing a customer
(cboCustomer) and contacts for each customer (cboContacts). I got the
cboContacts to only show the contacts unique to the customer by using
a requery code on the AfterUpdate of cboCustomer. That works fine.
However, when I move between records only the contact shown on the
first record displays, it does not update on subsequent records. If I
go back and select the customer from cboCustomer it updates and
displays the correct contact, but then the next record just shows the
one I just selected. I verified that when I switch between records
without doing anything (just letting the first record's name display)
that the table data does not update. So it is obviously just a visual
thing, and while I can understand what is going on, I am not sure that
the end user of this database will. Is there anyway to fix that, so
when the end user flips through the records, the correct name displays
always?

Your Combo Box is not bound to a field in the form's record source
table.
Set the Control source property of the combo to a field shown in the
Control source drop-down list of fields (click the down arrow on the
control source property line).
 
E

Eric

Your Combo Box is not bound to a field in the form's record source
table.
Set the Control source property of the combo to a field shown in the
Control source drop-down list of fields (click the down arrow on the
control source property line).

Both combo boxes are bound to their respective fields in the table.
They are bound to a numeric field that sets the ID from the respective
tables to my bids table.
 

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

Top