Sub form sort order

PaulJK

Registered User.
Local time
Today, 12:37
Joined
Jul 4, 2002
Messages
60
I have a sub form and the SQL is:

SELECT qryAppointments.ApptDate, qryAppointments.ApptStartTime, qryAppointments.ApptEndTime, qryAppointments.ClientID, qryAppointments.ClientPCTitle, qryAppointments.ClientFullName, qryAppointments.ClientPCForename, qryAppointments.ClientPCSurname, qryAppointments.EPCAgentName, qryAppointments.ApptStatus, qryAppointments.ApptOutcomeComments, qryAppointments.ApptID
FROM qryAppointments;

I have placed in the OrderBy box:

[ApptStartTime].ASC

I want to be able to sort the records in ascending start time, however the above does not work.

Can someone point me in the right direction.

Thank you.
 
Hi

I think the answer is:
SELECT qryAppointments.ApptDate, qryAppointments.ApptStartTime, qryAppointments.ApptEndTime, qryAppointments.ClientID, qryAppointments.ClientPCTitle, qryAppointments.ClientFullName, qryAppointments.ClientPCForename, qryAppointments.ClientPCSurname, qryAppointments.EPCAgentName, qryAppointments.ApptStatus, qryAppointments.ApptOutcomeComments, qryAppointments.ApptID
FROM qryAppointments order by qryAppointments.ApptStartTime;

If this isn't quite correct open up a new query, put the table in it and add all the fields you want. In the sorted row select asscending for the required field. Check the answer is what you want by viewing the results then go to the sql window and copy the code. I find this much quicker and more accurate then typing the sql myself, i'm not that good a typist!

Sue Powell
 

Users who are viewing this thread

Back
Top Bottom