Next Birthday

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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]))
 
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].
 
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]))
 
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]))
 

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

Back
Top