open table by vba defining a certain sort order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo,

I do open a table by using the docmd.opentable "xyz" command which works fine.
But by opening it, i need to sort the content by column 6, 7 and 8 (named
Subjekt0, Subjekt1, Subjekt2), but can't get it working.

The used command DoCmd.RunCommand acCmdSelectAllRecords sorts by ALL
columns, starting by column 1, which exactly is not what I want.

Anyone knowing any way?
 
Never assume anything about the order of data in a table. In relational
databases, tables are "sacks of data", where the records are put wherever
they fit.

If you want the data returned in a specific sort order, create a query with
an appropriate ORDER BY clause and use the query wherever you would
otherwise have used the table.
 
Back
Top