egidijus.jankauskas
New member
- Local time
- Today, 07:53
- Joined
- Feb 22, 2011
- Messages
- 9
Hi,
when I run a query it says "You tried to execute a query that does not include the specified expression '[Receiving details]![Price FC]*0.1*[Receiving]![Exchange Rate]' as part of an aggregate function." and
access help says "You tried to execute a query that does not include the specified expression <name> as part of an aggregate function. (Error 3122)". There is SQL code:
Anyone has any ideas where is the problem
THank you.
when I run a query it says "You tried to execute a query that does not include the specified expression '[Receiving details]![Price FC]*0.1*[Receiving]![Exchange Rate]' as part of an aggregate function." and
access help says "You tried to execute a query that does not include the specified expression <name> as part of an aggregate function. (Error 3122)". There is SQL code:
Code:
SELECT [Deliveries to factory].DeliveryID, [Deliveries to factory].[Delivery to factory date], [Additional costs].[Customs clearance date], [Additional costs].Discharge, [Additional costs].[Customs brokerage], [Additional costs].[IMP garanties], [Additional costs].Storage, [Additional costs].[Storage per day], [Deliveries to factory].ReceivingID, [Deliveries to factory]![Delivery to factory date]-[Additional costs]![Customs clearance date] AS DACC, [Deliveries to factory].[Gross weight], [Deliveries to factory].[Net weight], [Net Weight]/DLookUp("[Sum Of Weight]","[Pivot query]","[ReceivingID]=" & [Receiving]![ReceivingID]) AS POTC, Receiving.ReceivingID, [POTCG]*[Discharge] AS DischargePart, [POTCG]*[IMP garanties] AS [IMP garantiesPart], [POTCG]*[Customs brokerage] AS CustBrokeragePart, [POTCG]*[Storage] AS StoragePart, [DACC]*[Storage per day]*[Deliveries to factory].[Gross weight]*0.001 AS [Storage ACC], [Deliveries to factory].TranspCosts, [POTC]*[Total LTL]+[DischargePart]+[IMP garantiesPart]+[custbrokeragePart]+[storagepart]+[Storage ACC]+[TranspCosts] AS PriceKG, Receiving.[Received in Store], [Deliveries to factory]![Gross weight]/DLookUp("[Gross weight]","[Receiving]","[ReceivingID]=" & [Receiving]![ReceivingID]) AS POTCG, [Receiving details]![Price FC]*0.1*[Receiving]![Exchange Rate] AS [TOTAL LTL]
FROM ((Receiving INNER JOIN [Additional costs] ON Receiving.ReceivingID = [Additional costs].ReceivingID) INNER JOIN [Deliveries to factory] ON Receiving.ReceivingID = [Deliveries to factory].ReceivingID) INNER JOIN [Receiving details] ON Receiving.ReceivingID = [Receiving details].ReceivingID
GROUP BY [Deliveries to factory].DeliveryID, [Deliveries to factory].[Delivery to factory date], [Additional costs].[Customs clearance date], [Additional costs].Discharge, [Additional costs].[Customs brokerage], [Additional costs].[IMP garanties], [Additional costs].Storage, [Additional costs].[Storage per day], [Deliveries to factory].ReceivingID, [Deliveries to factory].[Gross weight], [Deliveries to factory].[Net weight], Receiving.ReceivingID, [Deliveries to factory].TranspCosts, Receiving.[Received in Store];

Last edited: