Create a hidden column for both the year and the month and sort on those columns.
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
No. I was talking about sorting the records from within a query.
If the field that you want to sort by has a DataType of Date/Time then you would be able to select either Ascending or Descending in the Sort Row of that field when the query is in Design View
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
As an aside, Data and In are reserved words and should not be used as field names
http://allenbrowne.com/AppIssueBadWord.html#D
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
would be helpful to see the full sql to your query and some example data since what you have tried should have worked (i.e. assuming data is a date datatype) but what you are showing is another field displayed as mm-yy or perhaps mm-dd
That's the full SQL
Code:SELECT Format([Data],"mm/yy") AS Mese, Sum(IIf([In]=0,([Importo]),0)) AS totUscite, Sum(IIf([In]=-1,([Importo]),0)) AS totEntrate, Format$(Abs([totUScite]/[totEntrate]-1),"0%") AS [Risparmiato%], ([totEntrate]-[totUScite]) AS Risparmiato, Round(([totUScite]/31),0) AS [€/gg]FROM Movimenti GROUP BY Format([Data],"mm/yy"), Format([Data],"yy/mm") ORDER BY Format([Data],"yy/mm");
and some example data from Movimenti?
please provide data in a format that can be copied into a table (excel will do)- remove columns not required.
Here it is Movimenti.zip
your query per post#7 and data provided works for me
Mese 12/15 01/16 02/16
I use "Remove sort" button and worked also for me... What a shame! thanks!