S,
If the customer has already processed the book, DLookUp will return the
Book_ID (we don't really care, but it returns something).
It will return a Null value if the customer has no activity.
You can't compare the DLookUp to a VBA string:
If DLookUp(...) = SomeVBAString ...
You will get "Invalid use of Null", if there's no activity.
So, if you want to check for activity (The DLookUp is Not Null):
If Not IsNull(DLookUp(...)) Then
That's the "outside" of it.
Inside the DLookUp:
DLookUp("[Field]", "Table", "Criteria")
Criteria = "[String] = 'SomeString' And [Number] = 123 And Date = #1/1/2004# And [SomeField] Is Not Null"
Wayne
If the customer has already processed the book, DLookUp will return the
Book_ID (we don't really care, but it returns something).
It will return a Null value if the customer has no activity.
You can't compare the DLookUp to a VBA string:
If DLookUp(...) = SomeVBAString ...
You will get "Invalid use of Null", if there's no activity.
So, if you want to check for activity (The DLookUp is Not Null):
If Not IsNull(DLookUp(...)) Then
That's the "outside" of it.
Inside the DLookUp:
DLookUp("[Field]", "Table", "Criteria")
Criteria = "[String] = 'SomeString' And [Number] = 123 And Date = #1/1/2004# And [SomeField] Is Not Null"
Wayne