Combobox Display confusing

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
 
F

fredg

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] = ""
 
V

Van T. Dinh

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.
 
A

Annelie

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
 
A

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
 

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