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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Group by Quarters Using Characters



 
 
Thread Tools Display Modes
  #1  
Old February 4th, 2006, 06:11 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

Hello all,

I have a report based on a table that contains various dates throughout a
year. I wish the report to group by the monthly quarters 1 -4. This I have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1, Q2.
Thanks for taking the time to read this. All help and guidence welcome :-)

Debbie D. (UK)

  #2  
Old February 4th, 2006, 07:18 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

probably the easiest way would be to use a SQL statement as the RecordSource
for your report, as

SELECT *, DatePart("q",[DateOfBirth]) AS Qtr FROM TableName;

substitute the correct table name, of course. if your report is bound to a
query, rather than to a table, then instead of changing the report's
RecordSource, simply add the calculated field into the existing query, as

Qtr: DatePart("q",[DateOfBirth])

*group* the report on the Qtr field, so the quarters will be in numeric
order. in the group Header section, add an unbound text box with its'
ControlSource set to the following expression, as

=Choose([Qtr],"Jan - Mar","Apr - Jun","Jul - Sep","Oct - Dec")

hth


"Debbie D." wrote in message
...
Hello all,

I have a report based on a table that contains various dates throughout a
year. I wish the report to group by the monthly quarters 1 -4. This I

have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1, Q2.
Thanks for taking the time to read this. All help and guidence welcome

:-)

Debbie D. (UK)



  #3  
Old February 4th, 2006, 07:59 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

Debbie D. wrote:
I have a report based on a table that contains various dates throughout a
year. I wish the report to group by the monthly quarters 1 -4. This I have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1, Q2.



Use a text box expression like:

=MonthName(3*(DatePart("q",Date+99)-1)+1,True) & "-" &
MonthName(3*DatePart("q",Date),True)

--
Marsh
MVP [MS Access]
  #4  
Old February 4th, 2006, 09:30 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

Marshall, you have my many thanks. Debbie D.

"Marshall Barton" wrote:

Debbie D. wrote:
I have a report based on a table that contains various dates throughout a
year. I wish the report to group by the monthly quarters 1 -4. This I have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1, Q2.



Use a text box expression like:

=MonthName(3*(DatePart("q",Date+99)-1)+1,True) & "-" &
MonthName(3*DatePart("q",Date),True)

--
Marsh
MVP [MS Access]

  #5  
Old February 4th, 2006, 09:30 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

Thank you Tina for your reply. Superstar!!

"tina" wrote:

probably the easiest way would be to use a SQL statement as the RecordSource
for your report, as

SELECT *, DatePart("q",[DateOfBirth]) AS Qtr FROM TableName;

substitute the correct table name, of course. if your report is bound to a
query, rather than to a table, then instead of changing the report's
RecordSource, simply add the calculated field into the existing query, as

Qtr: DatePart("q",[DateOfBirth])

*group* the report on the Qtr field, so the quarters will be in numeric
order. in the group Header section, add an unbound text box with its'
ControlSource set to the following expression, as

=Choose([Qtr],"Jan - Mar","Apr - Jun","Jul - Sep","Oct - Dec")

hth


"Debbie D." wrote in message
...
Hello all,

I have a report based on a table that contains various dates throughout a
year. I wish the report to group by the monthly quarters 1 -4. This I

have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1, Q2.
Thanks for taking the time to read this. All help and guidence welcome

:-)

Debbie D. (UK)




  #6  
Old February 5th, 2006, 07:30 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Group by Quarters Using Characters

you're welcome


"Debbie D." wrote in message
...
Thank you Tina for your reply. Superstar!!

"tina" wrote:

probably the easiest way would be to use a SQL statement as the

RecordSource
for your report, as

SELECT *, DatePart("q",[DateOfBirth]) AS Qtr FROM TableName;

substitute the correct table name, of course. if your report is bound to

a
query, rather than to a table, then instead of changing the report's
RecordSource, simply add the calculated field into the existing query,

as

Qtr: DatePart("q",[DateOfBirth])

*group* the report on the Qtr field, so the quarters will be in numeric
order. in the group Header section, add an unbound text box with its'
ControlSource set to the following expression, as

=Choose([Qtr],"Jan - Mar","Apr - Jun","Jul - Sep","Oct - Dec")

hth


"Debbie D." wrote in message
...
Hello all,

I have a report based on a table that contains various dates

throughout a
year. I wish the report to group by the monthly quarters 1 -4. This

I
have
managed with the statement below:
Quarter: "Q" & CStr(DatePart("q", [DateOfBirth]))

However, the reports groups on the heading Q1, Q2 etc. Is it possble

to
show the month characters as in Jan-Mar, Apr-Jun instead of the Q1,

Q2.
Thanks for taking the time to read this. All help and guidence

welcome
:-)

Debbie D. (UK)






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I give rights to a group to access my calendar in Outlook Mike H Calendar 5 December 10th, 2005 01:07 AM
O.E. Address Book Groups Joy Outlook Express 12 February 2nd, 2005 04:13 AM
BUG: Using GROUP BY in query expression on MEMO fields it truncates data in MEMO fields to first 255 characters [SolarAngel] Running & Setting Up Queries 5 December 7th, 2004 06:29 PM
BUG: Using GROUP BY in query expression on MEMO fields it truncates data in MEMO fields to first 255 characters [SolarAngel] Setting Up & Running Reports 5 December 7th, 2004 06:29 PM
Electronic Price List Jono General Discussion 2 September 28th, 2004 03:59 PM


All times are GMT +1. The time now is 12:18 AM.


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