question

27423078 avatar image
0 Votes"
27423078 asked KenSheridan-7466 edited

Conditional formatting based on table values MS access

Hi,

I have a general table and another one with specified dates, how to highlight dates which included in the second table using conditional formatting inside form or report?

office-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KenSheridan-7466 avatar image
0 Votes"
KenSheridan-7466 answered KenSheridan-7466 edited

In the conditional formatting expression call the DLookup function like this:

DLookup("ColumnName","TableName","ColumnName = #" & Format([ControlName],"yyyy-mm-dd") & "#") IS NOT NULL

Note that the use of the ISO standard for date notation of YYYY-MM-DD when building the date literal prevents any international ambiguity of the date format.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.