Link to home
Start Free TrialLog in
Avatar of peterslove53
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?
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of peterslove53
peterslove53

ASKER

how do i change that to a more user friendly error message
One option is, in you code that uses the value from the combobox, to have a check for Null:

If IsNull(Me!YourCombobox.Value) Then
    ' Wrong or no entry.
    MsgBox "Select an option."
Else
    ' Continue.
    ' Run your present code.
End If

/gustav