peterslove53
asked on
"Invalid Use of Null" Error when using combobox
i use values from a combobox to pass to a query that filters a table but i get the
"Invalid Use of Null" Error when i type in a value in the combobox not part of the drop down list. I expect this value to be passed to my procedure as well and no records will be returned. What i am i doing wrong?
"Invalid Use of Null" Error when i type in a value in the combobox not part of the drop down list. I expect this value to be passed to my procedure as well and no records will be returned. What i am i doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
One option is, in you code that uses the value from the combobox, to have a check for Null:
If IsNull(Me!YourCombobox.Val ue) Then
' Wrong or no entry.
MsgBox "Select an option."
Else
' Continue.
' Run your present code.
End If
/gustav
If IsNull(Me!YourCombobox.Val
' Wrong or no entry.
MsgBox "Select an option."
Else
' Continue.
' Run your present code.
End If
/gustav
ASKER