Next Birthday

E

Ed Shanley

I have a query set-up that I'm trying to get their NEXT birthday. It's
currently putting out their birthday this year. Any suggestions? The
database field is Birthday1.

Thanks.

Current Query

Birthday: DateSerial(Year(Now()),Month([Birthday1]),Day([Birthday1]))
 
E

Ed Shanley

Meant to add this too. I'm trying to set it up so that it will only pull
birthdates between two fields: [txtStartDate] and [txtEndDate].
 
A

Allen Browne

So you need to add 1 if the birthday is already past?

Try:
NextBirthday: DateSerial(Year(Date()) -
(DateSerial(Year(Date()),Month([Birthday1]),Day([Birthday1])) < Date()),
Month([Birthday1]),Day([Birthday1]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Ed Shanley said:
Meant to add this too. I'm trying to set it up so that it will only pull
birthdates between two fields: [txtStartDate] and [txtEndDate].

Ed Shanley said:
I have a query set-up that I'm trying to get their NEXT birthday. It's
currently putting out their birthday this year. Any suggestions? The
database field is Birthday1.

Thanks.

Current Query

Birthday: DateSerial(Year(Now()),Month([Birthday1]),Day([Birthday1]))
 
E

Ed Shanley

Thank you so much! This worked great.

Allen Browne said:
So you need to add 1 if the birthday is already past?

Try:
NextBirthday: DateSerial(Year(Date()) -
(DateSerial(Year(Date()),Month([Birthday1]),Day([Birthday1])) < Date()),
Month([Birthday1]),Day([Birthday1]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Ed Shanley said:
Meant to add this too. I'm trying to set it up so that it will only pull
birthdates between two fields: [txtStartDate] and [txtEndDate].

Ed Shanley said:
I have a query set-up that I'm trying to get their NEXT birthday. It's
currently putting out their birthday this year. Any suggestions? The
database field is Birthday1.

Thanks.

Current Query

Birthday: DateSerial(Year(Now()),Month([Birthday1]),Day([Birthday1]))
 
Top