M
Martin
Hello,
I have a combo box that selects the fields available from a table. In some
instances there will be null values so I write some SQL in the Row Source of
the combo box to show "(Blank)" where the values are Null.
This is the code I have on the on click event of the combo box:
If [WorkTypeList] = "(All)" Then
[Work Type] = ""
ElseIf [WorkTypeList] = "(Blank)" Then
[Work Type] = "Is Null"
ElseIf [WorkTypeList] > "" Then
[Work Type] = [WorkTypeList]
End If
I then run a query with a criteria on the worktype list. This works
perfectly when the user selects a value from the box but when they select
(All) or (Blank) then the query returns nothing.
Am I doing something wrong when treating the null values? When i type in Is
Null in the query criteria this works fine also.
Please help!!
Martin
I have a combo box that selects the fields available from a table. In some
instances there will be null values so I write some SQL in the Row Source of
the combo box to show "(Blank)" where the values are Null.
This is the code I have on the on click event of the combo box:
If [WorkTypeList] = "(All)" Then
[Work Type] = ""
ElseIf [WorkTypeList] = "(Blank)" Then
[Work Type] = "Is Null"
ElseIf [WorkTypeList] > "" Then
[Work Type] = [WorkTypeList]
End If
I then run a query with a criteria on the worktype list. This works
perfectly when the user selects a value from the box but when they select
(All) or (Blank) then the query returns nothing.
Am I doing something wrong when treating the null values? When i type in Is
Null in the query criteria this works fine also.
Please help!!
Martin