Crosstab query not sorted

  • Thread starter mls via AccessMonster.com
  • Start date
M

mls via AccessMonster.com

I am using crosstab query to transpose my results, but all my fields are
automatically orderd to ASC.
Is there a way to not to sort my results.
My data..
F 4.5 1/2/2010
F 3.3 2/2/2010
B 3.4
G 6.4
H 0 1/2/2010
H 3.4 2/2/2010
A 2.3 1/2/2010
A 3.5 2/2/2010

After transpose I need the results as..
F B G H A
4.5 3.4 6.4 0 2.3 1/2/2010
3.3 0 0 3.4 3.5 2/2/2010

Not this..
A B F G H
2.3 3.4 4.5 6.4 0
3.5 0 3.3 0 3.4
 
J

Jerry Whittle

You need to manually manipulate the column headings. Open the crosstab query
in Design view. Right click the area near the tables. Select Properties.
There should be a column heading row. In it put:

"F","B","G","H","A"

Note that only the above fields will show up. If you think that you will
have a Z in the future, you want to put it in now. It will just leave an
empty column.
 
M

mls via AccessMonster.com

I am in the process of automation( read from machine genrated .csv file --
process all the business rules in Access and generate a Excel report), so my
column heading vary each time. Also I can't have place holder for all the
columns as I will writing to Excel template with only the columns that are in
the input file.

Jerry said:
You need to manually manipulate the column headings. Open the crosstab query
in Design view. Right click the area near the tables. Select Properties.
There should be a column heading row. In it put:

"F","B","G","H","A"

Note that only the above fields will show up. If you think that you will
have a Z in the future, you want to put it in now. It will just leave an
empty column.
I am using crosstab query to transpose my results, but all my fields are
automatically orderd to ASC.
[quoted text clipped - 18 lines]
2.3 3.4 4.5 6.4 0
3.5 0 3.3 0 3.4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top