By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,582 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

Combobox & null

P: n/a
I need to check if combobox is empty, so I write:

if combobox = null then msgbox "..."

but it doesn't work. In debug mode, combobox is null.
Please help!

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
try this

if nz(combobox, "") = "" then
this means if the combobox is null or a zerolength string (""). If you do
not care about the zerolength string then try

if isnull(combobox) then

BTW, in code, combobox should probably be replaced by

me.controls("name of your control")

or in the property sheet: [name of the control]
Let me know how you get on.

- Nicolaas

Nov 13 '05 #2

P: n/a
> [...]
if isnull(combobox) then

Thanks! It works!

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.