How do I check if an item has been chosen in a combobox?

Gimp

New member
Local time
Today, 14:22
Joined
Apr 12, 2003
Messages
9
I tried IsNull(ComboBox) and it doesnt work.
Please help
Thanks.
 
If i try to write this:
[cmbMyCombo]![Text]=""
i get a type mismatch error
 
Are you trying to validate this on a Form?
 
yes

i do all the field validation stuff in a macro, displaying msgboxes if a some field is empty and such. its all being run the moment you click the save button.
 
Last edited:
Add the following to the On Click Event of the button:

If isnull(me.comboboxname) then
Msgbox "You need to select an item from the ComboBox",vbokonly,"Validation Error"
Else
Your code to run your macro here...
End if

HTH
 
is it possible to do it through a macro's condition?
 

Users who are viewing this thread

Back
Top Bottom