Sort table before export

SeanD

Registered User.
Local time
Today, 20:01
Joined
Mar 9, 2011
Messages
62
Hi all,

I would like to sort my table before I export it.
I'll want my table sorted Ascending on Column 'Time'.
How is that possible?

To export the table, I use this code:
Code:
DoCmd.OutputTo acOutputTable, "LogTable", acFormatXLS, , False

Thanx!
 
Create a query of the table, sort on that column, then output the query.
 
Is that the only way?
isn't it possible with VBA code?
 
You could create the query in code, but you would still be creating a query. If you want to retrieve a set of records from a table you must use a query, whether it is a temporary one created in a module, or a stored one created in the query design grid.
 

Users who are viewing this thread

Back
Top Bottom