How do you test for a NULL value in a Combo Box?

  • Thread starter Thread starter Aaron E via AccessMonster.com
  • Start date Start date
A

Aaron E via AccessMonster.com

I have a combo box on a form which may sometimes have a null value in it.
There is no way around that. It's complicated. Please just take my word for
it.

Is there a way to test for a null value in it?

Isnull(me.ComboBox1.Value) isn't working. It's thowing an error, saying,
"you entered an expression that has no value".

Thanks.

Aaron
 
Aaron said:
I have a combo box on a form which may sometimes have a null value in it.
There is no way around that. It's complicated. Please just take my word for
it.

Is there a way to test for a null value in it?

Isnull(me.ComboBox1.Value) isn't working. It's thowing an error, saying,
"you entered an expression that has no value".


Is Null is the right thing to use. Where is that line of
code?

That error often means that the code is running before the
control has been initialized (e.g. the form's Open event)
 
Combo boxes sometimes don't have a value if there is
a data problem. What section of the form is the cbo
on? In which event are you testing? Is it a bound control?
Is it a bound form? What is the recordsource of the
combo?

(david)
 
Back
Top