Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstabs and Month Order

Status
Not open for further replies.

bdog2g

Technical User
Feb 18, 2002
12
US

I have a crosstab query based on a table created by a make-table query. The crosstab produces the output I want but the month colums are in alphabetical order not chronological. I can't use fixed columns because dates for task completion are based on a subform input and vary for each task (i.e. one task my go from Feb-02 to Mar-02, while the other goes from June-03 to Dec-03). As started before the output is fine, I just want the dates to be chronological...can anyone help?
 
I believe the crosstab query headings are sorted (in the absence of explicit column headings) alphabetically or numerically. So, one way you could do this is to convert the column headings to numbers and then reformat them in your report.

Eg, you probably have something like Format([aDate],"mmm-yy") for your column heading now.

Change this to: CInt(Format([a],"yyyymm"))

This should output columns in chronological order. Good Luck,
Mike T
 
I believe the crosstab query headings are sorted (in the absence of explicit column headings) alphabetically or numerically. So, one way you could do this is to convert the column headings to numbers and then reformat them in your report.

Eg, you probably have something like Format([aDate],"mmm-yy") for your column heading now.

Change this to: CInt(Format([aDate],"yyyymm"))

This should output columns in chronological order. Good Luck,
Mike T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top