Combo Box Help!!!

  • Thread starter Thread starter Té
  • Start date Start date
T

Té

Does anyone know how to create a default on the combo box after selecting one
item it defaults back to select one? I have been trying to figure this out
for a week now. I have a combo box with master card, visa, discover, and
select one. When I choose master card for the first record and then I move
onto the second record master card remains, however I want it to default back
to select one. I've tried everything and nothing is working. Please help!!!
 
If your combobox is unbound (i.e., not bound to an underlying field in the
table/query), making a selection "sets" it.

If you want an unbound combobox to "re-set", you'll need to add code that
tells it to do so, probably every time the form opens.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Presumably you want the combo box to display "select one" when the form
first opens (as Jeff mentioned), but what other behavior are you expecting?
Do you want it to reset every time you move to a different record (whether
it's a new record or not), or only when you move to a new record?
 
My combo box is unbound. What type of coding? I'm brand new to Access.

If the combo box is unbound, then any selection you make will be lost - not
stored anywhere. Don't forget, data is stored in tables and only in tables! A
form is just a tool, a window to let you edit data in tables. What is the
purpose of the combo box if you're not storing the selection?
 
I want it to reset everytime a payment method is entered. So if record one
payment is mastercard when I move on to record two I want it to default back
to select one.
 
Then you would use the forms Current event and code it like;

Me![YourComboBox] = "select one"

Every time you move to a different record your combo box will reset.
However, as John mentioned, if your combo box is unbound, any selection
you make in it will not be stored anywhere. Are you using it to search for
records that have a matching payment type? Otherwise, I must be missing
the point of what you're doing.
 
Thank you beetle! It makes sense now! I was just putting it there as a
payment option, but I realize I have to a field name "payment" in the table I
am using in order for the default value to work! Thank you soooo much!!!
 
The value will reset every time the form opens. However you could use
form_afterupdate if the form is bound to a table. Or if you have an accept
button (you'll need something if the field is unbound) add the code there.
 
Back
Top