Crosstab query - for every month

G

Guest

hi guys,

I have never used a crosstab query before so any help would be greatly
appreciated. I have a table with Fund, Assets, Month, and Year. I want to
create a (crosstab?) query where the results would look like a spreadsheet
with each Fund down the side, every onth across the top with sum of assets in
the cells, for a specific year. the wizard created basically what I wanted
but only returns columns for months that are populated and I want a column
for every month, regardless of if it is in my table. Is that possible? The
month_field in my table can be populated 1 thru 12.
 
D

Duane Hookom

You can set the Column Headings property to all potential months:
Column Headings: 1, 2, 3, ....12
 
D

Duane Hookom

A table like this is unnecessary since the month name can be derived quite
easily from the month number using either the MonthName() or Format()
functions.
 
G

Guest

Hi Duane, I knew it would probably be you by looking at all the other
Crosstab query question. Thanks for responding. Where do I set the column
heading property???
 
G

Guest

Never mind, I think I got it:

PIVOT [tblFund].[Report_Month] In
("1","2","3","4","5","6","7","8","9","10","11","12");
 
D

Duane Hookom

You got it...

--
Duane Hookom
MS Access MVP
--

MaBell said:
Never mind, I think I got it:

PIVOT [tblFund].[Report_Month] In
("1","2","3","4","5","6","7","8","9","10","11","12");

MaBell said:
Hi Duane, I knew it would probably be you by looking at all the other
Crosstab query question. Thanks for responding. Where do I set the column
heading property???
 

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