DLookup in Conditional Formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to use a date check in conditional formatting. I have a table of
extra info that I need to use the DLookup.

I tried to use this formula, but the change would not work:
If field is less than Date()-dLookup([dhallexpiration],[tblExtrainfo])

That didn't work. Anyone have any tips?

Thanks As Always
Rip
 
You need " characters in the DLookup function call:

Date()-DLookup("dhallexpiration","tblExtrainfo")
 
Ripper said:
I need to use a date check in conditional formatting. I have a table of
extra info that I need to use the DLookup.

I tried to use this formula, but the change would not work:
If field is less than Date()-dLookup([dhallexpiration],[tblExtrainfo])


DLookup's argument are strings so they need quotes around
them:

Date() - DLookup("dhallexpiration", "tblExtrainfo")

But that is going to be pretty slow. It would be better if
you included that data in the form's record source query.
 
Back
Top