How can I check a combo box content or value or something

M

Marco

Hi. I need to check if my combobox has something on it, what I mean is if my
users choose any value.

I need something looked like:

if combo1 then
msgbox "you must choose an option on Combo1"
exit sub
end if

How can I do something looked like?

Regards,
Marco
 
M

Mark A. Sam

Marco,

In the AfterUpdate event of the combo type,

if IsNull(combo1.text) then
msgbox "you must choose an option on Combo1"
End If
 
R

Ron2006

That identical test can be made on any other condition/event on the
form - and probably should be otherwise if they never touch the field
the afterupdate code would never be executed.

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top