I have a union query which returns all the products in an order (for picking). It is a union query becuase some products are made up of other products. Some products exist in both tables therefore, also show up as two seperate rows in the results of the query. Is there a way that I can have the query with a record that exists in both tables(which shows in two rows) to get put into one row?
Thanks.
Sample of Code
SELECT Products.ProductID, Products.Name, Products.Color, Products.IsMixed, Products.Barcode, OrderedProducts.QtyOrdered As Qty
FROM (Products INNER JOIN OrderedProducts ON Products.ProductID = OrderedProducts.ProductID)
WHERE (((OrderedProducts.InvoiceID)=[Forms]![FRM_FaxInCustomer].[InvoiceID]))
UNION SELECT Products.ProductID, Products.Name, Products.Color, Products.IsMixed, Products.Barcode, OrderedProductsMixedComponents.QtyNeeded As Qty
FROM Products INNER JOIN OrderedProductsMixedComponents ON Products.ProductID = OrderedProductsMixedComponents.ProductID
WHERE ((OrderedProductsMixedComponents.InvoiceID)=[Forms]![FRM_FaxInCustomer].[InvoiceID]);