C
Claudette Hennessy
I have a report based on a crosstab query. I wish to limit the data to a
specific year, which is selected from a combo box on a form.
Crosstab: qxtCurrentDepositChecklist
TRANSFORM First(qryCurrentDepositChecklist.Deposit) AS FirstOfDeposit
SELECT qryCurrentDepositChecklist.ShopFirstName,
qryCurrentDepositChecklist.ShopName, qryCurrentDepositChecklist.Year,
First(qryCurrentDepositChecklist.Deposit) AS [Total Of Deposit]
FROM qryCurrentDepositChecklist
GROUP BY qryCurrentDepositChecklist.ShopFirstName,
qryCurrentDepositChecklist.ShopName, qryCurrentDepositChecklist.Year
PIVOT qryCurrentDepositChecklist.ShowName;
The source query: qryCurrentDepositChecklist
SELECT DISTINCT tblDealer.ShopFirstName, tblDealer.ShopName,
sqryCurrentDepositChecklist.ShowName,
sqryCurrentDepositChecklist.Year, tblEvent.Deposit
FROM (sqryCurrentDepositChecklist INNER JOIN tblDealer ON
sqryCurrentDepositChecklist.ShopID = tblDealer.ShopID) INNER
JOIN tblEvent ON tblDealer.ShopID = tblEvent.ShopID
WHERE (((sqryCurrentDepositChecklist.Year)=[Forms]![frmDialogDot]![cboYear])
AND ((tblEvent.Deposit)>0));
I get an error message "Microsoft Jet Engine does not recognize
Forms!frmDialogDot!cboYear as a valid fieldname or expression"
The crosstab query does not permit Forms]![frmDialogDot]![cboYear] as a
criterion for the Year field. How do I limit the data based on the year of
choice?
Thank you in advance
Claudette
specific year, which is selected from a combo box on a form.
Crosstab: qxtCurrentDepositChecklist
TRANSFORM First(qryCurrentDepositChecklist.Deposit) AS FirstOfDeposit
SELECT qryCurrentDepositChecklist.ShopFirstName,
qryCurrentDepositChecklist.ShopName, qryCurrentDepositChecklist.Year,
First(qryCurrentDepositChecklist.Deposit) AS [Total Of Deposit]
FROM qryCurrentDepositChecklist
GROUP BY qryCurrentDepositChecklist.ShopFirstName,
qryCurrentDepositChecklist.ShopName, qryCurrentDepositChecklist.Year
PIVOT qryCurrentDepositChecklist.ShowName;
The source query: qryCurrentDepositChecklist
SELECT DISTINCT tblDealer.ShopFirstName, tblDealer.ShopName,
sqryCurrentDepositChecklist.ShowName,
sqryCurrentDepositChecklist.Year, tblEvent.Deposit
FROM (sqryCurrentDepositChecklist INNER JOIN tblDealer ON
sqryCurrentDepositChecklist.ShopID = tblDealer.ShopID) INNER
JOIN tblEvent ON tblDealer.ShopID = tblEvent.ShopID
WHERE (((sqryCurrentDepositChecklist.Year)=[Forms]![frmDialogDot]![cboYear])
AND ((tblEvent.Deposit)>0));
I get an error message "Microsoft Jet Engine does not recognize
Forms!frmDialogDot!cboYear as a valid fieldname or expression"
The crosstab query does not permit Forms]![frmDialogDot]![cboYear] as a
criterion for the Year field. How do I limit the data based on the year of
choice?
Thank you in advance
Claudette