Excel Transfer- Sorting

paulcherianc

Registered User.
Local time
Yesterday, 18:33
Joined
Aug 15, 2013
Messages
86
Am trying to transfer a table to excel with the following code. But i am not getting the data in ascending order with a specific column. Can anyone help me plz.:banghead:

Set rs = db.OpenRecordset("QUG_Accident_Register_MainTable", dbOpenSnapshot)
 
I think i have found a workaround!

Set rs = db.OpenRecordset("SELECT QUG_Accident_Register_MainTable.* FROM QUG_Accident_Register_MainTable ORDER BY QUG_Accident_Register_MainTable.Date ASC;")
 
that is the usual solution. In pretty much any situation you never access tables directly, only through queries
 

Users who are viewing this thread

Back
Top Bottom