F
fcmedina78
I have a report based on a query that should sort assending. I used the
DatePart function to display dates as weeks and the query sees the dates as a
number but my report see's it has text and will not wort correctly. I tried
wrapping the extression in the Val() function with no success. Here is the
query I used:
SELECT tblWinEntry.[Store Number], DatePart("yyyy",[DateEntry]) AS [Year],
DatePart("q",[DateEntry]) AS Quarter, Val(DatePart("ww",[DateEntry])) AS
Week, Sum(tblWinEntry.[Win Amount]) AS [SumOfWin Amount]
FROM tblWinEntry
GROUP BY tblWinEntry.[Store Number], DatePart("yyyy",[DateEntry]),
DatePart("q",[DateEntry]), Val(DatePart("ww",[DateEntry]))
HAVING
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmReportSelection]![QuarterlyYearSelector])
AND
((DatePart("q",[DateEntry]))=[Forms]![frmReportSelection]![QuarterSelection]))
ORDER BY DatePart("q",[DateEntry]), Val(DatePart("ww",[DateEntry]));
Any Help???
Thanks in advance
DatePart function to display dates as weeks and the query sees the dates as a
number but my report see's it has text and will not wort correctly. I tried
wrapping the extression in the Val() function with no success. Here is the
query I used:
SELECT tblWinEntry.[Store Number], DatePart("yyyy",[DateEntry]) AS [Year],
DatePart("q",[DateEntry]) AS Quarter, Val(DatePart("ww",[DateEntry])) AS
Week, Sum(tblWinEntry.[Win Amount]) AS [SumOfWin Amount]
FROM tblWinEntry
GROUP BY tblWinEntry.[Store Number], DatePart("yyyy",[DateEntry]),
DatePart("q",[DateEntry]), Val(DatePart("ww",[DateEntry]))
HAVING
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmReportSelection]![QuarterlyYearSelector])
AND
((DatePart("q",[DateEntry]))=[Forms]![frmReportSelection]![QuarterSelection]))
ORDER BY DatePart("q",[DateEntry]), Val(DatePart("ww",[DateEntry]));
Any Help???
Thanks in advance