Avatar of pdvsa
pdvsa
Flag for United States of America asked on

Report Grouping

Hello,

I have a report grouped first by [Date] then by [CoName].
The report groups on date as I want but I need to include all other [CoName] with older dates BUT ONLY within that month.
Currently, those [CoName] records are bumped further down in the same month because of the sort I have.

example:
Co A with all dates in January need to be grouped together in January and sort needs to be by Date oldest to newest.  

I hope that makes sense.  If not please let me know.

I have attached a pared down db and there is only 1 rpt and 1 tbl
thank you
EE.accdb
* msaccess reportsMicrosoft Access

Avatar of undefined
Last Comment
pdvsa

8/22/2022 - Mon
Anders Ebro (Microsoft MVP)

So are really grouping by month? I'm not sure I fully understand yet.
ASKER CERTIFIED SOLUTION
Anders Ebro (Microsoft MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
pdvsa

ASKER

Hi, i am grouping by month and the report does show this grouping as first level.  I need the sort okdest to newest as it is now. The problem is that it wont group on CoName as the tecord is an older date.  Let me know if that helps. 

pdvsa

ASKER

Ok I see you uploaded a db.  On phone now.  Will be at computer soon.  Thank you 

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
pdvsa

ASKER

Hi Anders,


I have looked at the db and its pretty close but I need the first grouping on CoName to be the oldest date but currently is shows CoB as the first grouping and has Jan 29 and Jan 30.  So the first record in the rpt should be Jan 24 as its the oldest and then the next grouping would be on P-2 because the coname has the second oldest of Jan 27.  I tried to simply add a sort order on [Date] but it messes it up.  


Let me know if you follow me.  

pdvsa

ASKER

I noticed that if I put a sort on the [Date] in the query it looks correct when I run the query but the report doesnt display it the same for some reason.  

pdvsa

ASKER

wait..i think I have it now.  I put the sort rt below the MonthID on the report and it looks ok now.  thank you.  I think I am good nnow with your solution.  It works.  thank you much

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Anders Ebro (Microsoft MVP)

Glad you were able to work it out :)
pdvsa

ASKER

Anders,


Well I added more data and it doesnt seem to group like I thought.  I have not used EE in awhile.  Since the question is closed, I assume I will have to ask a moderator to re-open.  Kindly let me know best steps.  Thank you...sorry. 

pdvsa

ASKER

or do I just ask another question? I dont mind doing this.  

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Anders Ebro (Microsoft MVP)

I *THINK* this might be what your after, but you should test it with some more data. I am also concerned that if you have alot of data, that performance will not be all that good.

Should that be the case, you can consider if you can make the Month_ID a calculated field in your table, such that it is stored/cached.
EE_2.accdb
pdvsa

ASKER

Anders, i am viewing from my phone and i am not sure if there is something attached? It doesn't appear there is an attachment.

Anders Ebro (Microsoft MVP)

Yea...lets blame that one on the interface connecting the chair to the keyboard....

I have edited the post and added the attachment.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
pdvsa

ASKER

Ahhh.  Good news...it looks great!  Thank you for the follow up on that one.  Much appreciated.