conditional formatting for birthday date

B

bart van deun

Hello from Belgium,
i want to highlight the date-part in red in my form between the birthday and
14 day before thate date,
this code(here under) only lights up one day(birthday day) at the time, i
can not find the expression.

Month(Date())=Month([KLANTverjaardagdatum]) And
Day(Date())=Day([KLANTverjaardagdatum])

can anybody help me out?

Thank you!

ps. has to do with between 1 and -14 day before birthday
 
M

Marshall Barton

bart said:
i want to highlight the date-part in red in my form between the birthday and
14 day before thate date,
this code(here under) only lights up one day(birthday day) at the time, i
can not find the expression.

Month(Date())=Month([KLANTverjaardagdatum]) And
Day(Date())=Day([KLANTverjaardagdatum])


Try something more like:

Format(Date(), "mmdd") Between Format(KLANTverjaardagdatum,
"mmdd") AND Format(DateAdd("d", -14, KLANTverjaardagdatum),
"mmdd")
 

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