I know that I have a problem because of the Sum function used to calculate the total in my query.
This is the SQL I have for my query
SELECT Invoices.InvoiceNumber, Invoices.InvoiceDate, [Job Lines].JobLine, [Job Lines].DeliveryDate, [Job Lines].PriceEach, Parts.PartNumber, Parts.PartDescription, Parts.PartWeight, Customers.BillingLine1, Customers.BillingLine2, Customers.BillingLine3, Customers.BillingLine4, Customers.BillingLine5, Customers.ShippingLine1, Customers.ShippingLine2, Customers.ShippingLine3, Customers.ShippingLine4, Customers.ShippingLine5, Jobs.PO, [Job Lines].[Quantity]*[Job Lines].[PriceEach] AS ExtendedPrice, Sum([ExtendedPrice]) AS Total, [Job Lines].LineLabel, Parts.catID, Invoices.Terms, Invoices.Rep, Invoices.[Ship Date], Invoices.Via, Invoices.FOB, Invoices.[Field Total], Invoices.[Field Material], Invoices.[Field Labor], Jobs.JobNumber, [Job Lines].[Back Ordered], [Job Lines].[Line Description], [Job Lines].Quantity, Invoices.[InvoiceTotal (Reference Only)], [Job Lines].[Quantity]*[Parts].[PartWeight] AS Weight
FROM Invoices INNER JOIN (Customers INNER JOIN (Jobs INNER JOIN ((Parts INNER JOIN [Job Lines] ON Parts.PartNumber = [Job Lines].[fkPartNumber]) INNER JOIN [Invoice Lines] ON [Job Lines].JobLine = [Invoice Lines].[fkJobLine]) ON Jobs.JobNumber = [Job Lines].[fkJobNumber]) ON Customers.CustomerID = Jobs.[fkCustomerID]) ON Invoices.InvoiceNumber = [Invoice Lines].fkInvoiceNumber
WHERE (((Invoices.InvoiceNumber)=[Enter Invoice Number]));
My apologies for the format. I tried reading previous threads but I couldn't discern what clause needs to be added for the query to run.
Thanks