A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Month Captions and Labels



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2008, 08:27 PM posted to microsoft.public.access,microsoft.public.access.forms,microsoft.public.access.queries
Jasper Recto
external usenet poster
 
Posts: 257
Default Month Captions and Labels

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


  #2  
Old May 9th, 2008, 09:41 PM posted to microsoft.public.access.forms,microsoft.public.access.queries,microsoft.public.access
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Month Captions and Labels

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");

--
KARL DEWEY
Build a little - Test a little


"Jasper Recto" wrote:

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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.