Re: filtering by month
- From: SteveS <sanfu at techie dot com>
- Date: Thu, 9 Feb 2006 08:40:26 -0800
Change the calculated query column to:
expr: Format(datefield, "mm")
and change the criteria to.
Format([Enter month (1 - 12)], "mm")
HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
"Kelly" wrote:
I think I wasn't clear enough with my original question I want to do a query.
that I will use in a report for all Septembers between 2000 and 2005. I am
trying to show the enrollment trends for each year.
9/2000
9/2001
9/2002
9/2003
9/2004
9/2005
I'm sorry I wasn't clear, thanks for the other lesson though, I'm sure I can
use it sometime.
"Marshall Barton" wrote:
[Enter month year] is a parameter prompt that will pop up
when you run the query. A user would then type something
like 2/3006 or Feb 2006 or any kind of date that indicates
the month and year for the criteria. This term should be
replaced by whatever you are using to supply the criteria (a
text box on a form??)
The reason to Format the dates is to discard the day of the
month so it doesn't get in the way. It may not be as
intuitive, but it shortern than the alternatives. The
reason I use the year part of the format first is just in
case I want to sort by the formatted date.
Kelly wrote:
expr: Format([date], "yyyy/mm")--
This I got. It works great!
I don't understand the criteria though. - Format([Enter month year],
"yyyy/mm")
What is [Enter month year] ? Also, if you have time, can you explain why I
need to reformat the date so that maybe I can understand it a little better.
Don't forget, I'm still using the Dummies book.
Kelly wrote:"Marshall Barton" wrote:
I have a database full of enrollment numbers for each month of the year. The
date field is formatted - m/yyyy. I want to do a query for September
enrollment numbers since 2000. My Dummies Book doesn't cover searching for
month and year.
Try adding a calculated column to the query:
expr: Format(datefield, "yyyy/mm")
set its criteria to:
Format([Enter month year], "yyyy/mm")
and uncheck the Show box.
Marsh
MVP [MS Access]
- Follow-Ups:
- Re: filtering by month
- From: Kelly
- Re: filtering by month
- References:
- Re: filtering by month
- From: Marshall Barton
- Re: filtering by month
- From: Marshall Barton
- Re: filtering by month
- Prev by Date: Re: Function to Separate City & State
- Next by Date: Re: How to reverse table updated by select query in Access?
- Previous by thread: Re: filtering by month
- Next by thread: Re: filtering by month
- Index(es):
Relevant Pages
|