Crosstab with dynamic columns



I have a query that can return between 1 and 6 columns. I will use
colors for example. For some months the report can have 2 colors,
other months it can have up to 6 colors. Example

Color1 Color2 Color3 Color4 Color5 Color6
White Red

Color1 Color2 Color3 Color4 Color5 Color6
Blue Red Green Purple Brown Black

How can I hard code the categories labeled Color1-Color6 with the
attached colors, which can be different each time and include 1 to 6
different options. Something like autonumber would help, but how can
you do that in a query?


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