Hi: Can someone guide me with this Crosstab Query! I have a query named QryInvList and then a Crosstab Query based on the first query named QryInvList_Crosstab1.
The QryInvList_Crosstab1 works fine, as a query, but I want to put it in a report format so that I can add totals to the footer. The report is fine, except that I want to put in a date range and there is where the trouble begins.
The QryInvList_Crosstab1's SQL view is as follows (and it works great):
PARAMETERS [Enter Start Date] DateTime, [Enter Ending Date] DateTime;
TRANSFORM Sum(QryInvList.tblInvoice_details_Fee) AS SumOftblInvoice_details_Fee
SELECT QryInvList.Invoice_No, QryInvList.Invoice_Date, QryInvList.People_ID, Sum(QryInvList.tblInvoice_details_Fee) AS [Total Of tblInvoice_details_Fee]
FROM QryInvList
WHERE (((QryInvList.Invoice_Date) Between [Enter Start Date] And [Enter Ending Date]))
GROUP BY QryInvList.Invoice_No, QryInvList.Invoice_Date, QryInvList.People_ID
PIVOT QryInvList.Income_Category;
When I open the report and enter the dates that I am prompted for, I then get the error:
"The Microsoft Jet database engine does not
recognize " as a valid field name or expression".
I can't figure this out and where the " comes from.
Any help would be appreciated.
Sophia
The QryInvList_Crosstab1 works fine, as a query, but I want to put it in a report format so that I can add totals to the footer. The report is fine, except that I want to put in a date range and there is where the trouble begins.
The QryInvList_Crosstab1's SQL view is as follows (and it works great):
PARAMETERS [Enter Start Date] DateTime, [Enter Ending Date] DateTime;
TRANSFORM Sum(QryInvList.tblInvoice_details_Fee) AS SumOftblInvoice_details_Fee
SELECT QryInvList.Invoice_No, QryInvList.Invoice_Date, QryInvList.People_ID, Sum(QryInvList.tblInvoice_details_Fee) AS [Total Of tblInvoice_details_Fee]
FROM QryInvList
WHERE (((QryInvList.Invoice_Date) Between [Enter Start Date] And [Enter Ending Date]))
GROUP BY QryInvList.Invoice_No, QryInvList.Invoice_Date, QryInvList.People_ID
PIVOT QryInvList.Income_Category;
When I open the report and enter the dates that I am prompted for, I then get the error:
"The Microsoft Jet database engine does not
recognize " as a valid field name or expression".
I can't figure this out and where the " comes from.
Any help would be appreciated.
Sophia