I have a query
This works fine, no prob; Note the order by.
On a command button I have
On a different one I have
However on the form using the code in the command buttons it does not order by val([Task]). It is like I have not included that part at all.
Tasks are
Which display fine when the form is opened. When I click the command button they display.
Am I missing something???
Thank you for any help,
Code:
SELECT tbl_Task_Standards.Task, tbl_Task_Standards.Description
FROM tbl_Task_Standards
ORDER BY Val([Task]), tbl_Task_Standards.Task;
This works fine, no prob; Note the order by.
On a command button I have
Code:
Me.sfrm_Main.Form.OrderByOn = False
Me.sfrm_Main.Form.OrderBy = "[Area], val([Task]), [Task]"
Me.sfrm_Main.Form.OrderByOn = True
On a different one I have
Code:
Me.sfrm_Main.Form.OrderByOn = False
Me.sfrm_Main.Form.OrderBy = "val([Task]), [Task], [Area]"
Me.sfrm_Main.Form.OrderByOn = True
However on the form using the code in the command buttons it does not order by val([Task]). It is like I have not included that part at all.
Tasks are
01
02
2B
2C
5A
6A
14
22
30
Which display fine when the form is opened. When I click the command button they display.
01
02
14
22
2B
2C
30
5A
6A
Am I missing something???
Thank you for any help,