query / ascending or descending

Dick7Access

Dick S
Local time
Today, 15:12
Joined
Jun 9, 2009
Messages
4,325
I have a main form with name, address etc. I have a tabular form off to one side with lessons sent out, with lesson numbers. (1,2,3 etc.) (Master and child fields the same) populated from a joined query 1 to many. I want the oldest lesson at the top of the list, but no matter if I put sort under the lesson number ascending or descending, first lesson (1) is always at the top. What am I doing wrong?
 
What data type is the lesson number in the table. Is it a number or text? Post the sql for your query.
 
You haven't set the Form.OrderBy Property, (and forgot it)? :)
 
What data type is the lesson number in the table. Is it a number or text? Post the sql for your query.
Thanks for answering. I have tried it both ways, text and number. Right now this is with number Here's th SQL
SELECT tblMain.txtNameL, tblessons.txtLessonNo, tblMain.txtNameF, tblMain.CusKey, tblMain.txtSal, tblMain.txtAdd1, tblMain.txtAdd2, tblMain.txtCity, tblMain.txttate, tblMain.txtZip, tblMain.txtPhone, tblMain.txtEmail, tblMain.tgbSaved, tblMain.txtStartDate, tblMain.txtRef, tblMain.memComments, tblMain.imgFlag, tblessons.txtDateComp, tblessons.LessID, tblessons.txtLessonName, tblessons.txtDateSent
FROM tblMain LEFT JOIN tblessons ON tblMain.CusKey = tblessons.CusKey
ORDER BY tblMain.txtNameL, tblessons.txtLessonNo, tblMain.txtNameF;
 
No, it is a property of the form see below at the picture:
attachment.php
 

Attachments

  • FormOrderBy.jpg
    FormOrderBy.jpg
    85 KB · Views: 189
Thanks everybody: We have lift off.
Lesson subform: ordered by: tblessons.txtLessonNo DESC
 

Users who are viewing this thread

Back
Top Bottom