BloodshotVandal
11-19-2009, 12:45 AM
Hi All
I was wondering if someone could help me with a problem I am having. I have the following code in one of my queries.
SELECT tblMain.Category, *
FROM tblMain
WHERE (((tblMain.Category)=[Forms]![frmMain]![cboFilter]))
ORDER BY Switch(isnull(Forms!frmMain!cboSort),tblMain.Refer ence,
Forms!frmMain!cboSort="Completed",tblMain.DateComp,
Forms!frmMain!cboSort="Started",tblMain.DateStarted,
Forms!frmMain!cboSort="Modified",tblMain.DateLastMod,
Forms!frmMain!cboSort="None",tblMain.Reference);
The problem is that everything is ordered in ascending order, whereas I need the records to be sorted in descending order when ordering by "Completed", "Started" and "Modified".
Please help
Thanks in advance
I was wondering if someone could help me with a problem I am having. I have the following code in one of my queries.
SELECT tblMain.Category, *
FROM tblMain
WHERE (((tblMain.Category)=[Forms]![frmMain]![cboFilter]))
ORDER BY Switch(isnull(Forms!frmMain!cboSort),tblMain.Refer ence,
Forms!frmMain!cboSort="Completed",tblMain.DateComp,
Forms!frmMain!cboSort="Started",tblMain.DateStarted,
Forms!frmMain!cboSort="Modified",tblMain.DateLastMod,
Forms!frmMain!cboSort="None",tblMain.Reference);
The problem is that everything is ordered in ascending order, whereas I need the records to be sorted in descending order when ordering by "Completed", "Started" and "Modified".
Please help
Thanks in advance