T
TRB_NV
Would someone please help me correct the syntax for the following Query?
SELECT DISTINCTROW [Docket].[ID], [Docket].[DUEDATE], [Docket].[DOKPREFIX],
[Docket].[DOKSUFFIX], [Docket].[CLIENT], [Docket].[TITLE_SHRT],
[Docket].[SERIAL_NO], [Docket].[PATENT_NO], [Docket].[ITEM]
FROM Docket
WHERE ((([Docket].[DUEDATE]) Between [forms]![Summary]![Start Date] And
[forms]![Summary]![End Date]))
ORDER BY [Docket].[DUEDATE] [forms]![Summary]![Sort Order];
[forms]![Summary]![Sort Order] is populated from a drop down in FORM:Summary
and is either ASC or DESC. I want to give the user the option to select the
sort method when they enter the search criteria.
I've been able to get it to work manually using:
ORDER BY [Docket].[DUEDATE] ASC
ORDER BY [Docket].[DUEDATE] DESC
Thanks!
SELECT DISTINCTROW [Docket].[ID], [Docket].[DUEDATE], [Docket].[DOKPREFIX],
[Docket].[DOKSUFFIX], [Docket].[CLIENT], [Docket].[TITLE_SHRT],
[Docket].[SERIAL_NO], [Docket].[PATENT_NO], [Docket].[ITEM]
FROM Docket
WHERE ((([Docket].[DUEDATE]) Between [forms]![Summary]![Start Date] And
[forms]![Summary]![End Date]))
ORDER BY [Docket].[DUEDATE] [forms]![Summary]![Sort Order];
[forms]![Summary]![Sort Order] is populated from a drop down in FORM:Summary
and is either ASC or DESC. I want to give the user the option to select the
sort method when they enter the search criteria.
I've been able to get it to work manually using:
ORDER BY [Docket].[DUEDATE] ASC
ORDER BY [Docket].[DUEDATE] DESC
Thanks!