P
premysl 71
Can I use DLookUp with Null
I try to Try to use DLookUp function to insert "Year" value from the one
table to lable on report of another table.
It works if the value of "Year" is correct. If the DLookUp value should be
null it shows error " Wrong use of Null".
It seems like it does not read the "If" part.
Here is the code:
Dim enteredDate
enteredDate = DLookup(("Yearviolation_date])"), "tbEnterYearStreet",
"[violation_date]")
If enteredDate = Null Then
Label33.Caption = "Invalid Entry"
Else
Label33.Caption = enteredDate
End If
I try to Try to use DLookUp function to insert "Year" value from the one
table to lable on report of another table.
It works if the value of "Year" is correct. If the DLookUp value should be
null it shows error " Wrong use of Null".
It seems like it does not read the "If" part.
Here is the code:
Dim enteredDate
enteredDate = DLookup(("Yearviolation_date])"), "tbEnterYearStreet",
"[violation_date]")
If enteredDate = Null Then
Label33.Caption = "Invalid Entry"
Else
Label33.Caption = enteredDate
End If