Hello..
I have a report that is based of a query. In the query I have the following calculation:
total: ([quanity]*[packagecost])
I have also been able to group the like products, but it does not add the quanity correctly.
Here is the sql of the query:
I have attached the database...
The report in question is rptInvoice and the query is qryInvoice. The adding up works correctly on the form... frmDataEntry
Thanks
R~
I have a report that is based of a query. In the query I have the following calculation:
total: ([quanity]*[packagecost])
I have also been able to group the like products, but it does not add the quanity correctly.
Here is the sql of the query:
Code:
SELECT tblOrder.OrderID, tblOrder.OrderNumber, tblOrder.OrderDate, tblOrder.VendorID, tblLUVendor.VendorCompany, tblLUVendor.StreetAddress, tblLUVendor.City, tblLUVendor.PhoneNumber, tblLUVendor.FaxNumber, tblLUVendor.VendorNumber, tblLUVendor.AgreementNumber, tblOrder.ObjectCode, [City] & " " & [StateAbbreviation] & ". " & [ZipCode] AS FullAddress, tblLUVendor.ContactPerson, qrytblProduct.ProductID, qrytblProduct.Quanity, qrytblProduct.PackageCost, qrytblProduct.ProductNumberID, qrytblProduct.ItemDescription, qrytblProduct.ProductNumber, qrytblProduct.Packaging, [quanity]*[packagecost] AS total, qrytblProduct.Item, qrytblProduct.UnitID, qryUnit.Unit
FROM (((tblOrder LEFT JOIN tblLUVendor ON tblOrder.VendorID = tblLUVendor.VendorID) INNER JOIN qrytblProduct ON tblOrder.OrderID = qrytblProduct.OrderID) LEFT JOIN qryStates ON tblLUVendor.State = qryStates.ID) INNER JOIN qryUnit ON qrytblProduct.UnitID = qryUnit.UnitID
GROUP BY tblOrder.OrderID, tblOrder.OrderNumber, tblOrder.OrderDate, tblOrder.VendorID, tblLUVendor.VendorCompany, tblLUVendor.StreetAddress, tblLUVendor.City, tblLUVendor.PhoneNumber, tblLUVendor.FaxNumber, tblLUVendor.VendorNumber, tblLUVendor.AgreementNumber, tblOrder.ObjectCode, [City] & " " & [StateAbbreviation] & ". " & [ZipCode], tblLUVendor.ContactPerson, qrytblProduct.ProductID, qrytblProduct.Quanity, qrytblProduct.PackageCost, qrytblProduct.ProductNumberID, qrytblProduct.ItemDescription, qrytblProduct.ProductNumber, qrytblProduct.Packaging, [quanity]*[packagecost], qrytblProduct.Item, qrytblProduct.UnitID, qryUnit.Unit
HAVING (((tblOrder.OrderNumber)=[Forms]![frmDataEntry]![OrderNumber]));
I have attached the database...
The report in question is rptInvoice and the query is qryInvoice. The adding up works correctly on the form... frmDataEntry
Thanks
R~
Attachments
Last edited: