conditional formatting for birthday date

  • Thread starter Thread starter bart van deun
  • Start date Start 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
 
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")
 
Back
Top