Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

group sections by year

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KGates - 12 Oct 2005 21:28 GMT
I have built a report based on a query that is sorted by a case number.  
There is also a date field.  I'd like to get the report to group the cases by
year.  The closest I've come is to get a header for each record that lists
the year by using the following code:

DatePart("yyyy",[CaseDate])     but this lists the year for each record
instead of listing the year once.  I know I'm missing some simple piece, but
can't figure it out for the life of me.

What I want my report to look like is:

2000

CaseNumber1      CaseDate         InvolvedParty
Case Number2...

and then on a new page

2001

CaseNumber1...

Thanks for the help
Duane Hookom - 12 Oct 2005 22:39 GMT
Your primary/first level of sorting and grouping should be using the
expression:
   =Year([CaseDate])

Signature

Duane Hookom
MS Access MVP
--

>I have built a report based on a query that is sorted by a case number.
> There is also a date field.  I'd like to get the report to group the cases
[quoted text clipped - 21 lines]
>
> Thanks for the help
KGates - 12 Oct 2005 22:52 GMT
Where do I do that at?  When I went to the sorting and grouping, and placed
that expression in the field/expression spot, it sorted by the first number
of the date, but did not place it by year and sorted the dates wrong.  I'm
sorry if you have to state the obvious...this one I know should be simple.....

> Your primary/first level of sorting and grouping should be using the
> expression:
[quoted text clipped - 25 lines]
> >
> > Thanks for the help
Duane Hookom - 13 Oct 2005 01:12 GMT
You place the expression in the sorting and grouping dialog. What do you
mean by "first number of the date"?
If you need additional sorting, you will need to add another
field/expression under the =Year([CaseDate]) level.

Signature

Duane Hookom
MS Access MVP
--

> Where do I do that at?  When I went to the sorting and grouping, and
> placed
[quoted text clipped - 36 lines]
>> >
>> > Thanks for the help
Marshall Barton - 12 Oct 2005 23:39 GMT
>I have built a report based on a query that is sorted by a case number.  
>There is also a date field.  I'd like to get the report to group the cases by
[quoted text clipped - 17 lines]
>
>CaseNumber1...

Use Sorting and Grouping (View menu) to specify the group.
Set the Field/Expression cell to the expression
=Year(CaseDate)

Towards the botton of the window, set the Group Header
property to Yes.  Then back in the report's design window,
move the year text box to the group header section.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.