Filter by Date

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

Guest

Hi,

I have a database where I need to filter out birthdays or anniversaries to
send out cards. They are formatted as mm/dd/yyyy. We will be sorting the
whole month at the beginning of the month (for example, sort all April
birthdays/anniversaries on April 1), but I have not been able to figure out a
filter. My problem is, of course, that If I use the Between... and...
function typing in Between #4/1/1900# and #4/31/2006#, I get EvERY date
between then and now, not just April. How do I work around this??

Thanks everyone.
 
Dear Fullerton:

Since you are asking for a calendar month, how about filtering where
Month(YourDate) = 4?

Replace "YourDate" with the actual name of the column.

Tom Ellison
 
Create a new column/field in your query with an expression like:
BirthMonth: Month([BirthDateField])
and set the criteria to something like:
[Enter Month Number]

Or reference a control on a form in the criteria like:
Forms!frmRptParams!txtMthNum
 
Thanks Tom. Actually, I figured out a Criteria that helped out just as well.
I typed in Like 4/**/**** and that got the desired results. I'll keep yours
in mind too for future queries.
 
You are relying on Access correctly using your regional date settings and
converting date values to text. I would never do this. Tom's solution is
much more effective.

If you provide the SQL view of your current query, someone would provide a
more robust alternative.
 

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