J
Jonathan Wood
I've written some code that looks something like this:
Dim var As Variant
var = DLookup("CustomerID", "Customers",
"FirstName=""" & sFirstName & """ AND "
"LastName=""" & sLastName & """
This seems to work just fine. However, since sFirstName and sLastName are
strings, they will be "" instead of NULL. Therefore, this code fails if
Customers.FirstName or Customers.LastName is NULL.
The only solution I can think of here is rather involved. Does anyone know a
more slick way to have this work for NULL values when my comparison strings
are ""?
Thanks.
Jon
Dim var As Variant
var = DLookup("CustomerID", "Customers",
"FirstName=""" & sFirstName & """ AND "
"LastName=""" & sLastName & """
This seems to work just fine. However, since sFirstName and sLastName are
strings, they will be "" instead of NULL. Therefore, this code fails if
Customers.FirstName or Customers.LastName is NULL.
The only solution I can think of here is rather involved. Does anyone know a
more slick way to have this work for NULL values when my comparison strings
are ""?
Thanks.
Jon