I have a query, which look like this:
The ORDER BY part should be according to a selection in a combo box, meaning if "Department" is selected, then query should be "ORDER BY tblSJAHeader.Department", if "SJANumber" is selected, then "ORDER BY tblSJAHeader.SJANumber" etc.
Is it possible to change the query to reflect above?
Thanks.
Code:
SELECT tblSJAHeader.Department, tblSJAHeader.SJANumber, tblSJAHeader.SJATitle FROM tblSJAHeader
ORDER BY tblSJAHeader.xxxxxxxxxxx;
The ORDER BY part should be according to a selection in a combo box, meaning if "Department" is selected, then query should be "ORDER BY tblSJAHeader.Department", if "SJANumber" is selected, then "ORDER BY tblSJAHeader.SJANumber" etc.
Is it possible to change the query to reflect above?
Thanks.