Big query I can't get my head around..

Artimus

New member
Local time
Today, 09:34
Joined
Jul 9, 2009
Messages
8
Here is what I have so far;

Code:
SELECT ServiceJobCards.Job_Number, ServiceJobCards.Work_Done_Date, ServiceJobCards.DeliveryType, ServiceJobCards.ServiceType, ServiceJobCards.CustomerID, ServiceJobCards.ModelNumber, Customers.[First Name], Customers.Surname, Sum([ServicePartsOrders]![Unit Price]*[ServicePartsOrders]![Quantity]) AS Expr1, ServiceJobCards.Labour
FROM (ServiceJobCards INNER JOIN Customers ON ServiceJobCards.CustomerID = Customers.CustomerID) INNER JOIN ServicePartsOrders ON ServiceJobCards.Job_Number = ServicePartsOrders.CustomerOrderID
WHERE (((ServiceJobCards.Status)=1) AND ((ServiceJobCards.Paid)=2))
GROUP BY ServiceJobCards.Job_Number, ServiceJobCards.Work_Done_Date, ServiceJobCards.DeliveryType, ServiceJobCards.ServiceType, ServiceJobCards.CustomerID, ServiceJobCards.ModelNumber, Customers.[First Name], Customers.Surname, ServiceJobCards.Labour;

Which does exactly what I want, except for records in ServiceJobCards where Sum([ServicePartsOrders]![Unit Price]*[ServicePartsOrders]![Quantity]) is equal to 0. (Ie, they didn't order any parts).

Those records don't show up.

Any ideas?
 

Users who are viewing this thread

Back
Top Bottom