B
Ben
hey i have a quick question on a query which isnt working at the moment.
My query looks at 2 tables named: 'receipt main' and 'receipt details'
Below is a list of fields in each table:
RECEIPT MAIN: PK receiptNo, ReceiptDate, Salesperson
RECEIPT DETAILS: PK receiptNo, PK ProductNo,Quanitity, Price
My query is that i want the total price for all products sold on a
particular date. Below is my sql for the query:
SELECT Sum(CCur([Receipt Details]![Price]*[Receipt Details]!Quantity)) AS
[Total Sales], [Receipt Main].[Receipt Date]
FROM [Receipt Main] INNER JOIN [Invoice Details] ON [Receipt Main].ReceiptNo
= [Receipt Details].ReceiptNo
WHERE ((([Receipt Main].[Receipt Date])=[Please Enter Date]));
But this comes up with the following error: You tried to execute a query
that does not include the specified expression ‘Receipt Date’ as part of an
aggregate function. All help solving this problem would be great
My query looks at 2 tables named: 'receipt main' and 'receipt details'
Below is a list of fields in each table:
RECEIPT MAIN: PK receiptNo, ReceiptDate, Salesperson
RECEIPT DETAILS: PK receiptNo, PK ProductNo,Quanitity, Price
My query is that i want the total price for all products sold on a
particular date. Below is my sql for the query:
SELECT Sum(CCur([Receipt Details]![Price]*[Receipt Details]!Quantity)) AS
[Total Sales], [Receipt Main].[Receipt Date]
FROM [Receipt Main] INNER JOIN [Invoice Details] ON [Receipt Main].ReceiptNo
= [Receipt Details].ReceiptNo
WHERE ((([Receipt Main].[Receipt Date])=[Please Enter Date]));
But this comes up with the following error: You tried to execute a query
that does not include the specified expression ‘Receipt Date’ as part of an
aggregate function. All help solving this problem would be great