G
Guest
I'm using the following code to set up paramenters for a query. For some
reason, Like '*' isn't returning null values for this field although it is
for other fields. How can I change this code to read that if Len = 0 to
return records where Bldg is null as well? Thanks you much.
'Build Criteria string from Bldg Listbox
For Each VarItem In Me.cmdBldg.ItemsSelected
StrBldg = StrBldg & ",'" & Me.cmdBldg.ItemData(VarItem) & "'"
Next VarItem
If Len(StrBldg) = 0 Then
StrBldg = "Like'*'"
Else
StrBldg = Right(StrBldg, Len(StrBldg) - 1)
StrBldg = "IN(" & StrBldg & ")"
End If
reason, Like '*' isn't returning null values for this field although it is
for other fields. How can I change this code to read that if Len = 0 to
return records where Bldg is null as well? Thanks you much.
'Build Criteria string from Bldg Listbox
For Each VarItem In Me.cmdBldg.ItemsSelected
StrBldg = StrBldg & ",'" & Me.cmdBldg.ItemData(VarItem) & "'"
Next VarItem
If Len(StrBldg) = 0 Then
StrBldg = "Like'*'"
Else
StrBldg = Right(StrBldg, Len(StrBldg) - 1)
StrBldg = "IN(" & StrBldg & ")"
End If