Requiring a value for a combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a series of custom forms that return query criteria.

I would like, in each one, to have the click event of a command button check
to see that combobox controls have values selected from a list. If the user
has not made a selection, I would like a messagebox to alert them to do so.

I have gone nearly mad trying to figure out the syntax to do this. Please
could someone help me out. I can't see it being all that difficult!

Hope I'm not wrong.

Thanks in advance for any advice.
 
B. Meincke,

Try it like this...
If IsNull(Me.YourCombobox) Then
MsgBox "Make a selection.", , "Criteria required"
With Me.YourCombobox
.SetFocus
.Dropdown
End With
End If
 
Back
Top