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  

Crosstab Query - Column Heading Dates



 
 
Thread Tools Display Modes
  #1  
Old April 15th, 2007, 06:38 PM posted to microsoft.public.access.queries
Bob
external usenet poster
 
Posts: 1,351
Default Crosstab Query - Column Heading Dates

I am running a crosstab query however the column heading with the dates is
not in order. Instead of 1-2005, 2-2005.etc, I am getting 1-2005, 1-2006,
1-2007, 2-2005.
How can I get the dates to run sequentially at the top? The SQL code that I
am using for the original query is: GROUP BY Format([Month],"mm-yyyy"),

Thanks.

--
Bob
  #2  
Old April 15th, 2007, 07:22 PM posted to microsoft.public.access.queries
Ed Metcalfe
external usenet poster
 
Posts: 82
Default Crosstab Query - Column Heading Dates


"Bob" wrote in message
...
I am running a crosstab query however the column heading with the dates is
not in order. Instead of 1-2005, 2-2005.etc, I am getting 1-2005, 1-2006,
1-2007, 2-2005.
How can I get the dates to run sequentially at the top? The SQL code that
I
am using for the original query is: GROUP BY Format([Month],"mm-yyyy"),

Thanks.

--
Bob


Bob,

Your data is sorting in alphabetical order as the results of your format
function are returning a string.

Will the crosstab always contain the same month/year columns? If so you can
use the Column Headings property to explicitly declare the headings in the
correct order.

You could also reformat your date to yyyy-mm.

There are other solutions, which I will be happy to explain if these two are
insufficient.

Ed Metcalfe


  #3  
Old February 5th, 2010, 06:25 PM posted to microsoft.public.access.queries
JMalecha
external usenet poster
 
Posts: 12
Default Crosstab Query - Column Heading Dates

I am having the same problem, but my dates will change and I cannot have them
yy/mm. Can you please list the other options

"Ed Metcalfe" wrote:


"Bob" wrote in message
...
I am running a crosstab query however the column heading with the dates is
not in order. Instead of 1-2005, 2-2005.etc, I am getting 1-2005, 1-2006,
1-2007, 2-2005.
How can I get the dates to run sequentially at the top? The SQL code that
I
am using for the original query is: GROUP BY Format([Month],"mm-yyyy"),

Thanks.

--
Bob


Bob,

Your data is sorting in alphabetical order as the results of your format
function are returning a string.

Will the crosstab always contain the same month/year columns? If so you can
use the Column Headings property to explicitly declare the headings in the
correct order.

You could also reformat your date to yyyy-mm.

There are other solutions, which I will be happy to explain if these two are
insufficient.

Ed Metcalfe



  #4  
Old February 5th, 2010, 06:25 PM posted to microsoft.public.access.queries
JMalecha
external usenet poster
 
Posts: 12
Default Crosstab Query - Column Heading Dates

I am having the same problem, but my dates will change and I cannot have them
yy/mm. Can you please list the other options

"Ed Metcalfe" wrote:


"Bob" wrote in message
...
I am running a crosstab query however the column heading with the dates is
not in order. Instead of 1-2005, 2-2005.etc, I am getting 1-2005, 1-2006,
1-2007, 2-2005.
How can I get the dates to run sequentially at the top? The SQL code that
I
am using for the original query is: GROUP BY Format([Month],"mm-yyyy"),

Thanks.

--
Bob


Bob,

Your data is sorting in alphabetical order as the results of your format
function are returning a string.

Will the crosstab always contain the same month/year columns? If so you can
use the Column Headings property to explicitly declare the headings in the
correct order.

You could also reformat your date to yyyy-mm.

There are other solutions, which I will be happy to explain if these two are
insufficient.

Ed Metcalfe



  #5  
Old February 6th, 2010, 12:21 AM posted to microsoft.public.access.queries
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Crosstab Query - Column Heading Dates

Is the output going to a form or report? What type of options are you
looking for? Why can't you have them yy/mm?

If you are extra demanding about this, you may have to use some code to
build the SQL statement in code with the Column Headings included.

Duane Hookom
MS Access MVP

"JMalecha" wrote in message
...
I am having the same problem, but my dates will change and I cannot have
them
yy/mm. Can you please list the other options

"Ed Metcalfe" wrote:


"Bob" wrote in message
...
I am running a crosstab query however the column heading with the dates
is
not in order. Instead of 1-2005, 2-2005.etc, I am getting 1-2005,
1-2006,
1-2007, 2-2005.
How can I get the dates to run sequentially at the top? The SQL code
that
I
am using for the original query is: GROUP BY Format([Month],"mm-yyyy"),

Thanks.

--
Bob


Bob,

Your data is sorting in alphabetical order as the results of your format
function are returning a string.

Will the crosstab always contain the same month/year columns? If so you
can
use the Column Headings property to explicitly declare the headings in
the
correct order.

You could also reformat your date to yyyy-mm.

There are other solutions, which I will be happy to explain if these two
are
insufficient.

Ed Metcalfe



 




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 05:17 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.