Month Captions and Labels

J

Jasper Recto

I have table that has 3 fields.

Part Number DueDate Order Quantity

Using that table, I created a query that takes each due date for each order
and determines the month it is due and what the current month is.

The query has several columns.

The first column has an expression that checks the due month, if the due
month is 1 month greater than the current month, it records the order
quantity value. If not, it returns a 0.

The second column checks to see if the due month is 2 months greater than
the current month, if it is true, it grabs the order quantity value, if not
it returns a 0.

This sequence continues for 18 columns for 18 months.

Depending on when this query is run, the current month will change therefore
the value for each column will change.
Because of that, I can't simply put the name of the month on each column.

My question is this:
How can I make the caption of each column the month it is for?
If I can't do it in a query, can I do it in a form if I pull the data in the
datasheet layout?

Is this possible?

Thanks,
Jasper
 
K

KARL DEWEY

This is close ---
TRANSFORM Sum(Jasper.[Order Quantity]) AS [SumOfOrder Quantity]
SELECT Jasper.[Part Number], Sum(Jasper.[Order Quantity]) AS [Total Of Order
Quantity]
FROM Jasper
GROUP BY Jasper.[Part Number]
PIVOT Format([DueDate],"yyyy (mm) mmmm");
 

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