A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Month query / View



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2004, 09:21 AM
sotiris_s
external usenet poster
 
Posts: n/a
Default Month query / View

I have a table that have a field that holds dates and i have name it as "Mera" , now i want to make a query to
show me the products from that table in a year but in month segments i wrote in a query field the follow :
Month: Year([Mera]) & "-" & Month([Mera]) {and also group by, and asceding}
everything works fine but! when i go and make a chart out of this the data is there but the thysical order of the
months is gone... is something like 2004-1,2004-10,2004-11,2004-12,2004-2,2004-3 etc
is there something so i can corectly sort the data?
It is so important to me
Thank you for your time to help me,
Sotiris Stroungaris
  #2  
Old May 25th, 2004, 10:47 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default Month query / View

Sotiri,

This is happening because the expression Year([Mera]) & "-" & Month([Mera])
returns a text, so it is sorted as such. Try something like:

Format([Mera],"yyyy-mm"

instead. This will retain the date/time type of the original field, so your
sorting will be correct.

HTH,
Nikos

"sotiris_s" wrote in message
...
I have a table that have a field that holds dates and i have name it as

"Mera" , now i want to make a query to
show me the products from that table in a year but in month segments i

wrote in a query field the follow :
Month: Year([Mera]) & "-" & Month([Mera]) {and also group by, and

asceding}
everything works fine but! when i go and make a chart out of this the data

is there but the thysical order of the
months is gone... is something like

2004-1,2004-10,2004-11,2004-12,2004-2,2004-3 etc
is there something so i can corectly sort the data?
It is so important to me
Thank you for your time to help me,
Sotiris Stroungaris



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.