How do I search date/time only by mm/dd and include all years?

F

folkstar

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
 
S

Shiver My Timber

folkstar said:
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

I guess I would set up the query on the date of birth field myTable.dob
with a criteria

( month(myTable.dob) = month([start date]) )
or ( month(myTable.dob) = month([start date]) + 1 )
or ( ( month([start date]) = 12 ) and ( month(myTable.dob) = 1 ) )
 
F

folkstar

awesome. Thank you!

Shiver My Timber said:
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

I guess I would set up the query on the date of birth field myTable.dob
with a criteria

( month(myTable.dob) = month([start date]) )
or ( month(myTable.dob) = month([start date]) + 1 )
or ( ( month([start date]) = 12 ) and ( month(myTable.dob) = 1 ) )
 

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

Top