Combobox Display confusing

  • Thread starter Thread starter Annelie
  • Start date Start date
A

Annelie

When someone selects an item from a combo box, the curser jumps to the
record selected. It is then possible to scroll to the next or previous
record. But the combobox still shows the originally selected item. Is it
possible to clear the combobox when the item no longer matches the item
selected? It just looks confusing. Or even better, make the combobox scroll
with the current records.

Annelie
 
When someone selects an item from a combo box, the curser jumps to the
record selected. It is then possible to scroll to the next or previous
record. But the combobox still shows the originally selected item. Is it
possible to clear the combobox when the item no longer matches the item
selected? It just looks confusing. Or even better, make the combobox scroll
with the current records.

Annelie

Add one line of code at the end of the Combo Box event (AfterUpdate)
or in the Form's Current event:
Me![ComboName] = ""
 
It is better to synchronise the ComboBox with the current Record.

In the Form_Current Event, use something like:

Me.ComboBox = Me.RecordID

RecordID should be the Bound Column of your ComboBox.
 
Thanks to both of you,
I got Fred's suggestion to work but the other one, my program did not like.
I could not get the form to go back to forms view. Perhaps I didn't do it
correctly.
Annelie
 
I went at it again today, because I did not like what I got when the
combobox completely cleared. So I tried Van's suggestion again and I did it
right putting into the Forms_Current Event and now the selection scrolls
right with the rest of the form. Cool
Annelie
 
Back
Top