Crosstab Column Header Order

  • Thread starter AimeeK via AccessMonster.com
  • Start date
A

AimeeK via AccessMonster.com

I have a crosstab query that works great, but the columns are not in the
order I want...they are displayed as follows:

TEAM#, TEAM NAME, CATEGORY, VENDOR TYPE, LEG 1 GOAL, % OVER GOAL, ADD'L
POINTS, TOTAL POINTS, POINTS AWARDED, TOTAL OF QTY SHPD, 3/6/06, 3/13/06,
3/20/06, 3/27/06 - The dates are where the crosstab is, and the qty shpd is
shown under each date.

How do I get it to display this way?:

TEAM#, TEAM NAME, CATEGORY, VENDOR TYPE, 3/6/06, 3/13/06, 3/20/06, 3/27/06,
TOTAL OF QTY SHPD, POINTS AWARDED, % OVER GOAL, ADD'L POINTS, TOTAL POINTS

Please let me know if you need any further information...thanks.
 
D

Duane Hookom

You can't get a crosstab to display columns in that order. The Row Heading
fields are always on the left. You can swap the column headings around if
you use the Column Headings property.

You can create a select query based on your crosstab that moves the columns
around. Or, you can create a report or form based on your crosstab that
places the columns in a particular order.
 
G

Guest

One way to fix this problem is to open the crosstab query in design view;
right click in the area near the tables; and select Properties. Next go into
the Column Headings and put in something like:

'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'
or in your case:
'TEAM#','TEAM NAME','CATEGORY','VENDOR
TYPE','3/6/06','3/13/06','3/20/06','3/27/06','TOTAL OF QTY SHPD','POINTS
AWARDED','% OVER GOAL','ADD'L POINTS','TOTAL POINTS'

Your 'ADD'L POINTS' field will probably choke as it already has a ' in the
field name. Quick tip: Never, ever use any special characters, including the
space, in any field, table, report, etc., names. An underscore like
POINTS_AWARDED is OK. Just 123s and ABCs will make Access happy.

The above should match the expected data. Advantages of Column Headings
include sorting across as you want as the months above would normally do APR,
AUG, etc. You can also make data not show up by taking out a column. For
example, remove JAN and January data won't show. And for your needs, it will
create an empty field for the form or report even if there is no matching
data.

Of course this only works if you always know what your column heading need
to be. If not, there are ways to dynamically create the column headings and
controls on the form/report. Ask again if you need that solution.
 

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