Post the SQL statement that you're using... it'll be easier to suggest a
modification if we can see how you're grouping the data, etc.
Here is the SQL of my simplified Qry2:
SELECT [Qry1].Fld2, [Qry1].Month
FROM [Qry1]
GROUP BY [Qry1].Fld2, [Qry1].Month;
When the calculated field Month in Qry1 is defined as Month:
DatePart('m',[submit_date]), I get the following results:
Fld2 Month
A 6
A 7
A 8
A 9
A 10
B 7
B 8
B 9
C ...
....
and when I define the same field as Month: Format([submit_date],"mmm") & " "
& Format([submit_date],"yyyy"), I get the following results:
Fld2 Month
A Aug 2005
A Jul 2005
A Jun 2005
A Oct 2005
A Sep 2005
B Aug 2005
B Jul 2005
B Sep 2005
C ...
....
(BTW, it seems that the Group By statement not only groups but also sorts
the results as seen from the above results without even an explicit Order By
statement).
This is how I would like the results to be displayed:
Fld2 Month
A Jun 05
A Jul 05
A Aug 05
A Sep 05
A Oct 05
B Jul 05
B Aug 05
B Sep 05
C ...
....
How can I do it?
> Post the SQL statement that you're using... it'll be easier to suggest a
> modification if we can see how you're grouping the data, etc.
[quoted text clipped - 32 lines]
> >> > chronologically. How can I have my alphabetical format and sort
> >> > chronologically also in Qry2
Ken Snell [MVP] - 04 Nov 2005 02:03 GMT
SELECT [Qry1].Fld2, [Qry1].[Month]
FROM [Qry1]
GROUP BY [Qry1].Fld2, [Qry1].[Month]
ORDER BY [Qry1].Fld2, [Qry1].[Month];
Also, do not use Month as a field, control, or variable name! It's a VBA
function, and one of many reserved words in ACCESS. See these articles for
more information:
List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335
List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266
Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Signature
Ken Snell
<MS ACCESS MVP>
> Here is the SQL of my simplified Qry2:
>
[quoted text clipped - 92 lines]
>> >> > chronologically. How can I have my alphabetical format and sort
>> >> > chronologically also in Qry2