Dear Linda? Bob?:
Date fields, if they are a date/time datatype, are not mm/dd/yyyy or
any other readable format. They are a binary numeric value not
"readable" to humans. That can be VERY important to keep in mind.
They also contain a time portion, not just a date. However, in many
applications, the time portion is zeroed, meaning midnight and at the
very beginning of the day.
There is a MONTH() function that will extract the number of each month
(1-12) which might be of use, although you would probably need to
filter for the year as well. Otherwise you would get September 2002,
September 2001, etc. as well as September 2003.
You might want to have two combo boxes, one for the name of a month
and one for the year. Use a hidden column for the month combo so you
can reference the month number 1-12 rather than the name, unless you
want to present the user with month numbers instead of month names.
The user could then enter or pick a month and year, and your query
could filter by those:
WHERE MONTH(YourDate) = [Forms]![YourForm]![YourMonth]
AND YEAR(YourDate] = [Forms]![YourForm]![YourYear]
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
There is a date field (mm/dd/yyyy) in a table which is the basis of
several reports.
I wish to have the user easily select a month and year for a report
without have to type something like "Between #9/1/03# And #9/30/03#" in
a textbox.
It would prefer using something like comboboxes, so the user does not
have to know that there are only 30 days in September, etc.
Suggestions appreciated.