Value of Unselected ComboBox...?

SodaJim

Registered User.
Local time
Today, 15:02
Joined
Jan 12, 2003
Messages
51
Hello,

How can a reference the value of a ComboBox that user hasn't selected a text value?
The ComboBox is based on a value list.
I have a checkbox on the form that if unchecked by the user or left unchecked will need the user to select a value in the ComboBox.
My thoughts were to evaluate if the checkbox = false and combobox = Null then...

Any direction appreciated!
 
You'll need to use the IsNull() function

If IsNull(Me.YourListbox) Then ..

You'll need to check for both null and false for the checkbox:

If IsNull(Me.YourCheckbox) or Me.YourCheckbox = False Then ...

Note that if the checkbox is in fact null, the following test will not produce correct results:

If Me.YourCheckbox <> True Then
true path
Else
false path
End If

A null value will evaluate to the false path.
 
Thanks Pat!
That did the trick!
 

Users who are viewing this thread

Back
Top Bottom