Not allowing an empty combo box

  • Thread starter Thread starter Greg
  • Start date Start date
Greg said:
How do I set a combo box to not accept a blank answer?

Greg

well, there are a couple ways, depending on what you are doing. if the
combo box is bound to a table column you can set the column to require a
value. this will prevent saving the record unless the field is filled. you
can write code for the combo box itself to check for a value, but that will
only work if you actually get into the box then leave it so you can detect
an update or activate event. or you can write code on the form to check for
a valid value before you save the record or close the form, i like this one
the best as it gives you explicit control so you can put up a nice message
box.. and it works even if the combo box isn't bound to a column.
 
Back
Top