Conditional formatting for highlighting birthdays

stevekos07

Registered User.
Local time
Today, 08:22
Joined
Jul 26, 2015
Messages
174
Hello all. I have a report which displays a date of birth field. I want to be able to highlight records where the dd\mmm is equal to Date(). I have a query which generates a list which I think I should be able to reference with DLookup but I must have the expression wrong.

I have tried in the Conditional Formatting dialogue:

DLookup("ClientID","qryTodaysBirthDays") and the format accordingly.

What am I missing here?
 
Well, with no criteria that will return the first record in the query. I'd either use a join to that query, or use the Month() and Day() functions to compare the birthday to Date() in Conditional Formatting.
 
I worked out the solution. I needed to set the criteria as pbaldy said. It was fairly simple in the end. the Month() and Day() criteria were used to generate the query in the first place. All I needed to do was to set the criteria properly in the DLookup. The criteria set in the conditional formatting expression is:

DLookUp("[ClientID]","[qryTodaysBirthDays]","[ClientID]=" & [ClientID])

Now I have a client list which highlights every client's Birthday fiels when today is their birthday. So cool what Access can do!
 
Glad you got it working.
 

Users who are viewing this thread

Back
Top Bottom