search date/time by including all years?

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

Guest

How do I search date/time only by mm/dd and include all years?
ex. I'm setting up a birthday qry that will automatically pull up all
birthdays for the current and/or next month by using [enter start date]. But
I want access to include all years, so that the user only has to type in mm/dd
 
create a query SELECT NAME FROM EMP WHERE FORMAT(BIRTHDATE,"mmyyyy") =
forms!MyForm!TheDate
type of thing

HTH

Pieter
 
How do I search date/time only by mm/dd and include all years?
ex. I'm setting up a birthday qry that will automatically pull up all
birthdays for the current and/or next month by using [enter start date]. But
I want access to include all years, so that the user only has to type in mm/dd

Put in a calculated field by typing:

Happy: DateSerial(Year(Date()), Month([Birthdate]), Day([Birthdate]))

This will be this year's birthday anniversary, and can be searched
using a criterion such as

BETWEEN Date() AND DateAdd("ww", Date(), 1)

to get the birthdays for the coming week.

John W. Vinson[MVP]
 

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

Similar Threads

Birthday format 11
Access query 1
How do I search date/time only by mm/dd and include all years? 2
Special Date Input Settings 2
sort by date 5
Modifying Date Range 2 2
Modifying Date Range 3
Access 2007 and Dates 1

Back
Top