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 / March 2007

Tip: Looking for answers? Try searching our database.

Grouping Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Barnes - 29 Mar 2007 16:06 GMT
Access 2003...

Simple Query that includes "YrGrad" (Year Graduated).
It's a text field because the User wants to be able to have
"2006", "2005, 2006", "UK" (the School...working to get them
to change that to year/ years).

I use a DoCmd.OpenReport...to filter whatever is selected in a dropdown.
If "All Years" is selected in the Dropdown (part of a Union Select), there
is no filter in the DoCmd.OpenReport.  When "All Years" (all records in the
Query) opens, the Grouping goes crazy...IE..."UK", "93, 95", "2006" and
"1987"  is all that Groups.

Ideas?

TIA - Bob
Duane Hookom - 29 Mar 2007 16:38 GMT
What are the actual values? What do you mean by "goes crazy"? Report sorting
and grouping almost always works the way it is programmed to work.

It sounds like you have a data issue that should be cleaned up. You can
either modify your data or create a small function that uses the stored value
to convert to something that has more integrity.

Signature

Duane Hookom
Microsoft Access MVP

> Access 2003...
>
[quoted text clipped - 12 lines]
>
> TIA - Bob
Bob Barnes - 29 Mar 2007 17:28 GMT
Duane - Someone else wrote the database.

"YrGrad" is a Text Field...rather than restricting them to 1999, 2000, 2001,
...2007 etc.  So, if they want to enter "YrGrad" as "2006, 2007" the User has
wanted that before.

I could convert everything to numbers, and restrict to ONE year...but
Grouping should work on individual strings (text)...right?

This is the first time I've seen Grouping "fail"...

In the Report, I just do "Sorting and Grouping" by "YrGrad"...Descending.

Thank you - Bob

> What are the actual values? What do you mean by "goes crazy"? Report sorting
> and grouping almost always works the way it is programmed to work.
[quoted text clipped - 19 lines]
> >
> > TIA - Bob
Duane Hookom - 29 Mar 2007 17:37 GMT
Why do you think this is failing? What are some values that aren't sorted as
you would expect? How do they appear in the report?

Signature

Duane Hookom
MS Access MVP

> Duane - Someone else wrote the database.
>
[quoted text clipped - 41 lines]
>> >
>> > TIA - Bob
Bob Barnes - 29 Mar 2007 18:52 GMT
Duane...Trying to guess what's causing it to fail...

There are entries going back to "1940" thru "2006"...a "UK", a "93, 95, 97",
some others like "1992, 1993".  "YrGrad" is a text field.

When the Query is NOT filtered, it sorts like "UK", "93, 95, 97", "2006",
and "1987"....NONE of the other strings are Grouped.  I am not at the Client,
but I have a "Running Sum - Over All" in the Detail... (because the Report is
a Copy of a Report format that was not Grouped.).  Wondering if somehow the
"Over All" affects it?  I can test to "Over Group" when I'm there again.  Of
course the "Running Sum...Over All" starts w/ "1" thru "1084" for the
displayed Groupings of...
"UK", "93, 95, 97", "2006", and "1987"

Does that help?  I've Programmed Access starting in 1995, and have never
seen this before.

Thank you - Bob

> Why do you think this is failing? What are some values that aren't sorted as
> you would expect? How do they appear in the report?
[quoted text clipped - 44 lines]
> >> >
> >> > TIA - Bob
Duane Hookom - 30 Mar 2007 05:48 GMT
You stated "the Query is NOT filtered, it sorts like "UK", "93, 95, 97",
"2006", ..." I'm am not convinced that you are using the Sorting and
Grouping dialog in the report design view. If you did, I would expect the
YrGrad field to sort like:

1940
....
1992
1993
....
2006
2007
...
93
94
95
....
UK

What order is your report actually displaying these values? Is this field
the only sorting and grouping level?

Signature

Duane Hookom
MS Access MVP

> Duane...Trying to guess what's causing it to fail...
>
[quoted text clipped - 75 lines]
>> >> >
>> >> > TIA - Bob
Bob Barnes - 30 Mar 2007 15:48 GMT
Duane...

What order is your report actually displaying these values? Is this field
the only sorting and grouping level?

This Field is NOT the only one sorting, but is the only Grouping field.

I have in "Sorting and Grouping" this order

YrGrad - Descending
LastName - Ascending
FirstName - Ascending

The LastName & FirstName are "sorts" only...in Detail only.

Thank you for hanging in there on this.  If "worse comes to worse", I'll
play w/ this more when I return to the Client.  "If" this could affect this
(which I doubt) it's a Peer-to-Peer Server w/ 4 Users.

Bob

> You stated "the Query is NOT filtered, it sorts like "UK", "93, 95, 97",
> "2006", ..." I'm am not convinced that you are using the Sorting and
[quoted text clipped - 97 lines]
> >> >> >
> >> >> > TIA - Bob
Duane Hookom - 30 Mar 2007 16:20 GMT
I was hoping you would retype or organize the values that I provided in the
order that your report is displaying them.

Signature

Duane Hookom
MS Access MVP

> Duane...
>
[quoted text clipped - 130 lines]
>> >> >> >
>> >> >> > TIA - Bob
Bob Barnes - 30 Mar 2007 18:42 GMT
Sorting Ascending on the Grouping of "YrGrad" would give the Sort Order you
listed.

I had Sorting Descending on the Grouping of "YrGrad"...and it gave 4
groups...in this order...When there again, I can try Sorting Ascending on the
Grouping of "YrGrad".

This is what I had.....

UK
....
93, 95, 97
....
2006
....
1987
....

...Even though there were many other Groupings of 1940,.....,2005

Does this help?

TIA - Bob

> I was hoping you would retype or organize the values that I provided in the
> order that your report is displaying them.
[quoted text clipped - 133 lines]
> >> >> >> >
> >> >> >> > TIA - Bob
 
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.