F
fcmedina78
I have a report that includes a chart based on a query. When I type the
actual criteria into the query it the chart works without issue. When I
designed a form for the user to enter the crieteria and then directed the
query's criteria to that form the queries worked without issue but the chart
came back with an error saying that Jet did not recognize my criteria. I
tried renaming the fields in the reports without any luck. Here are the
details:
This is the query I am running:
SELECT tblWinEntry.[Store Number], Sum(tblWinEntry.[Win Amount]) AS
[SumOfWin Amount], DatePart("q",[DateEntry]) AS Quarter,
DatePart("yyyy",[DateEntry]) AS [Year]
FROM tblWinEntry
GROUP BY tblWinEntry.[Store Number], DatePart("q",[DateEntry]),
DatePart("yyyy",[DateEntry])
HAVING
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompFirstYrSelect]))
OR
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompSecondYrSelect]))
OR
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompThirdYrSelect]));
The above query works fine by itself or on a regular report, I only get the
error when I try to base a chart on it. Any Idea's?
actual criteria into the query it the chart works without issue. When I
designed a form for the user to enter the crieteria and then directed the
query's criteria to that form the queries worked without issue but the chart
came back with an error saying that Jet did not recognize my criteria. I
tried renaming the fields in the reports without any luck. Here are the
details:
This is the query I am running:
SELECT tblWinEntry.[Store Number], Sum(tblWinEntry.[Win Amount]) AS
[SumOfWin Amount], DatePart("q",[DateEntry]) AS Quarter,
DatePart("yyyy",[DateEntry]) AS [Year]
FROM tblWinEntry
GROUP BY tblWinEntry.[Store Number], DatePart("q",[DateEntry]),
DatePart("yyyy",[DateEntry])
HAVING
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompFirstYrSelect]))
OR
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompSecondYrSelect]))
OR
(((DatePart("yyyy",[DateEntry]))=[Forms]![frmCompReportSelection]![QuarterCompThirdYrSelect]));
The above query works fine by itself or on a regular report, I only get the
error when I try to base a chart on it. Any Idea's?