Hi there,
I have a form with which I enter data. A sort order, start date and end date.
Once the data is entered, a report is generated. But I get and error.
Error: "The Microsoft Access database engine does not recognize '[Forms]![AuditPTETotals]![startDate]' as a valid field name or expression.
This is my crosstab (AuditPTETotals _CrosstabDateRa nge) query which uses the data retrieved by another query (AuditPTETotals DateRange)
And this is AuditPTETotalsD ateRange
I have used this approach in a similar way to reference forms fields in a query but this time, I am not sure what I'm doing wrong. Please help.
Thank you
I have a form with which I enter data. A sort order, start date and end date.
Once the data is entered, a report is generated. But I get and error.
Error: "The Microsoft Access database engine does not recognize '[Forms]![AuditPTETotals]![startDate]' as a valid field name or expression.
This is my crosstab (AuditPTETotals _CrosstabDateRa nge) query which uses the data retrieved by another query (AuditPTETotals DateRange)
Code:
TRANSFORM Sum(AuditPTETotalsDateRange.PTEtotal) AS SumOfPTEtotal SELECT AuditPTETotalsDateRange.companyName, AuditPTETotalsDateRange.regNum, Sum(AuditPTETotalsDateRange.PTEtotal) AS [Total Of PTEtotal] FROM AuditPTETotalsDateRange GROUP BY AuditPTETotalsDateRange.companyName, AuditPTETotalsDateRange.regNum PIVOT AuditPTETotalsDateRange.description;
Code:
SELECT CUSTOMER.regNum, CUSTOMER.companyName, ScrapTireType.description, ScrapTireType.PTEamount, ScrapCollectionTireType.amount, ScrapCollection.PTEtotal, ScrapCollection.Date FROM (ScrapCollection INNER JOIN CUSTOMER ON ScrapCollection.regNum = CUSTOMER.regNum) INNER JOIN (ScrapTireType INNER JOIN ScrapCollectionTireType ON (ScrapTireType.scrapTireTypeID = ScrapCollectionTireType.scrapTireTypeID) AND (ScrapTireType.scrapTireTypeID = ScrapCollectionTireType.scrapTireTypeID)) ON ScrapCollection.scrapCollectionID = ScrapCollectionTireType.scrapCollectionID WHERE (((ScrapCollection.Date) Between [Forms]![AuditPTETotals]![startDate] And [Forms]![AuditPTETotals]![endDate]));
Thank you
Comment