DLookup in Conditional Formatting

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
 
K

Ken Snell \(MVP\)

You need " characters in the DLookup function call:

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

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top