Solved Sort an Access Table...

Gizem

Member
Local time
Tomorrow, 00:00
Joined
Nov 29, 2021
Messages
30
Hello again and a Happy New Year,

today i have an other problem. I have an Access table and now i would like to sort it numerical.
MyTable seems like:

ID POSITIONNAME
78 0 Mueller
792Baecker
80 1Scholz

It is important by sorting it, to take the whole row like:

IDPOSITION NAME
780Mueller
801Scholz
792Baecker

The order of Colomn two and three is important. I have to export the data of the NAMES by the right order.
I have read already that i need a query by coding.
 
Last edited:
Yes, use Query Builder to construct. Sort on POSITION field. Exactly what is the difficulty you are having with this basic task?
 
SELECT table.id, table.position, table.names
FROM

ORDER BY table.position;

Is there a field called name, that is a reserve keyword in ms access.
 
Just a bit of nomenclature here...

You cannot sort a table. Tables do not inherently have any order. The sort attempt usually doesn't "take." It is kind of a side-effect of the set theory that is the underlying basis for database operations.

You CAN, however, create a query to present all of the records of that table but sorted in a particular order. Forms and reports don't usually care that you gave them a query rather than a table as a record source.
 
Wait, a table can be saved with a sort order applied. However, only one field sort can be applied. When first selecting table as form RecordSource, it will pick up the table sort criteria and set the form Order By property. Same goes for a filter saved with table although the filter will be toggled off when table is closed and have to toggle on to apply filter when reopening table.

So, filtering/sorting on table is not a practical means to dynamically pass these criteria to form or report.
 
Hello together,

i had to add a query and sort it in it. I used Order By.

Thank you very much :)
 

Users who are viewing this thread

Back
Top Bottom