Combo Box: Need to prevent null entry.

culcuhain

New Member
Joined
Apr 28, 2010
Messages
21
Good morning,
I have a combo box in Access on a form. I need the user to select from the list, however; the list shows a null/blank until the user selects the drop down arrow. Currently the user can just hit enter and move to the next field without selecting anything. I cannot have this happen.
For the Field/Combo Box I have
Limit to List: Yes
Allow Value List Edits: No

What am I missing?
Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
There are several different options.

One is simply to make the default value of the box the first item in the combobox, that way something is always selected and it will never return a null.

Secondly, you could try to set the "on lose focus" event property to validate the text that is in the box. This would probably require some VBA coding though not too hard, although I always seem to have a problem resetting the focus back on the combobox.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top