I tried to create the following query:
SELECT Sum([NWT]/2000) AS YTDNWTons, Sum([CTOT]) AS YTDAmount, Count([NWT]) AS [YTDNo of Customers], tblScaleData.Ticket, tblScaleData.PROD
FROM tblScaleData
WHERE (((tblScaleData.Ticket) Like "sc1*") AND ((tblScaleData.PROD)="VEG1" Or (tblScaleData.PROD)="Wood1"));
but I'm getting an error that says:"You tried to execute a query that doesn't include the specified expression 'Ticket' as part of an aggregate function". But 'Ticket' is one of the fields in the table. What does this mean?
SELECT Sum([NWT]/2000) AS YTDNWTons, Sum([CTOT]) AS YTDAmount, Count([NWT]) AS [YTDNo of Customers], tblScaleData.Ticket, tblScaleData.PROD
FROM tblScaleData
WHERE (((tblScaleData.Ticket) Like "sc1*") AND ((tblScaleData.PROD)="VEG1" Or (tblScaleData.PROD)="Wood1"));
but I'm getting an error that says:"You tried to execute a query that doesn't include the specified expression 'Ticket' as part of an aggregate function". But 'Ticket' is one of the fields in the table. What does this mean?