Re: Month Query
- From: "accessuser via AccessMonster.com" <u28669@uwe>
- Date: Tue, 07 Nov 2006 00:47:11 GMT
I tried with the codes that you provided and just couldn't figure out. But I
tried using my Scheduled Month format as "number" in the table design. And
put criteria under the "Schedule Month" field as "Between [Enter Starting
Month] AND [Enter Ending Month]. It works the way I wanted by doing it
"number" format. But is there anyway to print reports with MONTH NAMES by
using the "number" format. Is there any way at all? I just can't get them
to work by using the tips you two provided.
I am also thinking of doing it by formating the Scheduled Month field as
number format, and then use combo boxes in the forms with 2 columns, one
number, and another month name, and on the report side by using a formula of
=scheduled month? WIll this work? Will it mess up some calculations in the
future?
Any easy way for me to do this month query, i am not an expert in access and
is getting very frustrated with this month query. If possible, is there any
possible access samples with just Month Query. I checked out the Allen
Browne, but couldn't figure out at all with that code.
Thanks again!
John Vinson wrote:
Hi,[quoted text clipped - 3 lines]
Criteria "Department Name." I also have a field called Scheduled Month. It
is in Month name from january - december.
That's your first problem. Your month name is a text string, which
will sort in the order April, August, December, February...
alphabetically. You've defined it as Text; Access is not going to
treat the text string "September" any differently than the text string
"Septentorialis" or "Serpentine".
You might want to consider storing the schedule date in a Date/Time
field, storing #9/1/2006# for something that's scheduled in September.
You can use a Format property of "mmmm" - or better "mmmm yy" - to
display this field as "September" or "January 07" (as it is, does
January mean LAST January or NEXT January, and how can you tell!?);
you'll need to enter a real date, though.
If a) you're stuck with the text date field and b) can confidantly
assume that each month is during the current year, you can use
something close to Rick's suggestion - I think he left out an
obligatory blank. Try putting a calculated field into a Query by
typing
DateScheduled: CDate("1-" & [Scheduled Month] & "-" & Year(Date()))
into a vacant Field cell in a query. This will calculate a Date/Time
field which will sort chronologically; you can use a criterion of
BETWEEN [Enter start date:] AND [Enter end date:]
If the user types a recognizable date value such as 9/1 or
10-Sept-2006 into the criteria, they'll get all records where the
first of the month is between their entered dates.
John W. Vinson[MVP]
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200611/1
.
- Follow-Ups:
- Re: Month Query
- From: John Vinson
- Re: Month Query
- References:
- Month Query
- From: accessuser via AccessMonster.com
- Re: Month Query
- From: John Vinson
- Month Query
- Prev by Date: Load Tab Data on Click
- Next by Date: Re: Change "Move After Enter" with code?
- Previous by thread: Re: Month Query
- Next by thread: Re: Month Query
- Index(es):
Relevant Pages
|