Birthday (next 14 days)

  • Thread starter Thread starter Sandspur
  • Start date Start date
S

Sandspur

I'm setting up a birthday qry that will pull up all
birthdays beginning with today's date and for the next 14 days

your help would be greatly appreciated
 
Create a table with one field named (say) CountID, of type Number.
Save the table as tblCount.
Enter 14 records (the numbers 0 to 13.)

Create a query using both your exisiting table and tblCount.
There is no line joining the 2 tables in the upper pane of query design.

In the Field row, enter an expression like this:
DateSerial(Year(Date())+tblCount.CountID, Month([DOB], Day([DOB]))
substituting your field name for DOB.
 
Field: BirthDayThisYear: DateSerial(Year(Date()),Month([DOB]), Day([DOB]))
Criteria: Between Date() and Date() + 14 OR Between
DateAdd("yyyy",-1,Date()) and DateAdd("yyyy",-1,Date()) + 14

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Perfection----- thank you so much



John Spencer said:
Field: BirthDayThisYear: DateSerial(Year(Date()),Month([DOB]), Day([DOB]))
Criteria: Between Date() and Date() + 14 OR Between
DateAdd("yyyy",-1,Date()) and DateAdd("yyyy",-1,Date()) + 14

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Sandspur said:
I'm setting up a birthday qry that will pull up all
birthdays beginning with today's date and for the next 14 days

your help would be greatly appreciated
 

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