Refine a sort in Access 2007

I have a report that first must be grouped by user. That works
Then I would like to sort by Store Number. That works
Where I get into trouble is I would like to sort by open and closed stores -closed at the bottom of the list- and then by store number
The  closed part works fine. the open part the store number are jumbled up.  The open stores just do not say closed. See attached
rptLocalTaxCodeReport.pdf
local-tax.docx
Serena2345Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
The issue may be the way "Open" store are designated...

What is the criteria for "Open" stores
Perhaps some are blank, Null, or Zero length strings, ...hence the confusion

Typically you would not have the "Field" being the "Value"
For example, ...In your database you have a Field called "Closed"

In reality, you should have a field called "StoreStatus" that stores the status as Yes/No, or a string value of "Open" or "Closed".

Then you can group by the "StoreStatus", field, ...then all the Yes/No (Or Open/Closed) will be grouped and sorted properly.

JeffCoachman
Jeffrey CoachmanMIS LiasonCommented:
Or, ...I may have misread your question...?

My guess is that you should first Group by the User, then Sort By "Open,Closed", ...Then, finally, sort by Store number...
Jeffrey CoachmanMIS LiasonCommented:
To keep his simple, ...
You could just post a small sample database with some representative data.
Then post a clear , graphical representation of the exact output you need, ...based on the sample data.

JeffCoachman
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Jeffrey CoachmanMIS LiasonCommented:
If this is what you need:
Group/Sort
Then see the attached sample db.
So, even if your "Open/Closed" designation is different from what I suggested, ...you should still be able to see what I have done here and replicate it with your data.
Database88.mdb

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Serena2345Author Commented:
i did think at one point that the null value might be the culprit. I will implement your suggestions and let you know. Thanks for taking the time.
Jeffrey CoachmanMIS LiasonCommented:
In my above case, ...you could also "group" by the StoreStatus, to keep all the Open and closed separate.
Then finally sort by Store number.
More sample fun is attached.

So as you can see, this all becomes easy if you change the way you designate Open and Closed stores.
;-)

JeffCoachman
Database88.mdb
Serena2345Author Commented:
I did as you suggested. I grouped first on user- then  grouped on open/closed -then sorted by store number. It worked!!!!! Thanks again for you help and interest
Jeffrey CoachmanMIS LiasonCommented:
Yes,

I had to re-read your Q a few times, ...then I think I figured out what you wanted.

One thing that helps is to set the "Sorting" first (before setting any "grouping")

This way, you get things in the correct Order.
Then you can substitute Grouping for Sorting (to get a break between each group for summaries.)
Groupings are automatically sorted, so there may not be a need to sort by a grouped field.
But you can still sort "under" the grouping.

Once you do it a few times, ...you will get the hang of it.

;-)

Jeff
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.