Excel Transfer- Sorting (1 Viewer)

paulcherianc

Registered User.
Local time
Yesterday, 20:04
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)
 

paulcherianc

Registered User.
Local time
Yesterday, 20:04
Joined
Aug 15, 2013
Messages
86
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;")
 

CJ_London

Super Moderator
Staff member
Local time
Today, 04:04
Joined
Feb 19, 2013
Messages
16,685
that is the usual solution. In pretty much any situation you never access tables directly, only through queries
 

Users who are viewing this thread

Top Bottom