Add a field to your query for the month number....set it to not be shown. Set the field line to:
Format(date, "mm"
Sort by this instead of your "displayed" date..... Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)
Robert L. Johnson III, MCP, Network+, A+
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
SELECT format(s_date,"mmm yyyy"
FROM jobs order by cDate(format(s_date,"mmm yyyy") -----------------------------------------------------------------
"The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'."
- unknown
I will try and explain some more. I have a base query with a field name aliased grouping. From this query a number of consolidated queries are produced. The grouping can changed from Vintage to Customer Age to any other group that is requested. With the vintage it would ne nice to display March 1999 instead of 01/03/1999. When I try this the format statement produces a string (obviously) and therefore sorts alphabetically.
I cant use an additional column because of the way the data is moved through the queries. Any ideas how this is possible.
Additionally I am storing the base query as a sqlstr in a memo field, for each record there is another memo field that contains the sqlstr for the final query - so that sample sizes and groupings can be produced. The "grouping" column must always be called grouping because of the links and its relationship to the report that sits on top.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.