Sort Order For all objects

  • Thread starter Thread starter OldManEd
  • Start date Start date
O

OldManEd

Access2007
Is there any way to make the sort order for tables, queries, forms and
report to always show the most recent at the top of the list instead of at
the bottom when each is opened? Can one write a macro to do this on start
up?
OMEd
 
Why would you want to? That is, what would having that help you accomplish?
I ask, not from simple curiosity, but because knowing the underlying
business need may suggest alternate approaches.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Access2007
Is there any way to make the sort order for tables, queries, forms and
report to always show the most recent at the top of the list instead of at
the bottom when each is opened? Can one write a macro to do this on start
up?
OMEd

No.

Tables *have no order*. They should be considered as unordered "sacks" of
data. The records are not stored or displayed chronologically, nor in any
other controllable order.

Queries can have any sort terms you choose. Just include the date/time field
containing the date the record was created (you need to add this field
yourself, defaulting it to =Now(), as Access doesn't record that information)
and sort descending by it.

Base your forms on queries with this sort, and use this same field in the
Sorting and Grouping property of your Reports.
 
I schedule quarterly luncheons. I keep track of who says they are coming and
who actually came. Each table has address data and other fields. Each
quarter I copy the last table and use a query update to clear some fields.
Also delete records of members that have died since previous meeting. Each
table's name is the meeting date. I have been doing this for 20+ years and I
now have 80 tables!!!! I want to see the last table first.

I also have a data entry forms and reports . Same thing.

I want the latest ones to show first whenever I select tables, forms,
queries, etc. It seem natural to sort either descending or ascending and not
only ascending. Poor design. Can I write a macro to do this?

OMEd
 
I read the OP's question as: How to sort the NAMES of objects in the database
window, not the data in tables.

For versions prior to 2007, click View and choose Details, then click on the
"Modified" column header. Each successive click on that header will toggle
between ascending and descending sort. You must repeat this for every class
of object - Tables, Forms, Queries, etc.

For A2007, right-click on the object header (e.g. Tables), click Sort by,
and choose the property and order from the drop-down menu.
 
?! One table for each meeting?! Let me guess, you started out using
spreadsheets?!

Access is a relational database. If "normalized" and "relational" are not
familiar terms, spend some time brushing up on them. You won't get good (or
easy) use of Access' relationally-oriented features/functions if you feed it
'sheet data!

Here's a first guess at what you might be looking at. Feel free to clarify
your particular situation.

You have people.

You have meetings.

You have people who plan to and those who actually do attend a
meeting.

That's three tables, not 80!

More info, please!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
While "sort the objects in the database" is what the OP asked about, doing
so may not be a good use of Access' tools. After all, I can drive nails
with my chainsaw, but it isn't a good use of the tool (and is vaguely
dangerous, and makes me work MUCH too hard!).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
No. Not VisiCalc. I started out using Ashton-Tate's dBase, then FoxBASE,
then Paradox and now Access. Not every application has to be relational!! A
single flat data table work fine; I start each cycle from the previous data
table using a query update. The only time I need to look back is when
someone asks when a member joined, died or moved.

Moreover, I'm too old to learn new tricks and see no reason to change just
for the sake of change. Also, I don't need a complicated relational
application to pass on. Remember, "KISS."? Keep it simple, stupid! Vince
Lombardi, Green Bay Packers, Super Bowl 1.
OMEd
 
Or maybe, "if it were simple, some other idiot would have already figured it
out"<g>!

What I proposed wasn't "for the sake of change". If you want to get the
best use of the tools Access offers, you need to feed it what it expects.

Perhaps one of the other newsgroup readers has come up with a work-around to
make Access do what you described.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The OP wants to sort the DISPLAY of the objects. Using the UI to achieve that
is a most proper use of Access tools. Would you consider changing the sort of
file lists in Windows Explorer a bad use of Windows tools?
 
We're discussing two different aspects.

Yes, I use Windows Explorer's sort feature.

Yes, the OP can use what you described to offer sorting of Access objects.

My observation has nothing to do with this topic...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top