A
Angi
I have a query, Invoices. I created a form and a report off of it.
It's only giving me the first invoice, not all of them, and I don't
understand why. I used the Nwind db as a guide so I don't see the
problem. Please help me find the problem!! There's one one-to-many
relationship which is QuoteMain to OrdersDetails by pk QuoteID (fk in
ordersDetails). I've tried changing the join, but that didn't help.
There are currently two invoices in the QuoteMain table (5201 and
5202). It's only pulling up 5201. TIA!
SQL:
SELECT QuoteMain.*, OrdersDetails.ClassID, OrdersDetails.SubclassID,
OrdersDetails.SizeID, OrdersDetails.Quantity, OrdersDetails.UnitPrice,
OrdersDetails.ExtPrice, OrdersDetails.LineNumber, OrdersDetails.Notes,
CompMain.CompanyName, CompMain.Address1, CompMain.Address2,
CompMain.City, CompMain.State, CompMain.Zip, CompMain.Phone,
CompMain.Fax, ContactMain.Salutation, ContactMain.FirstName,
ContactMain.LastName, Subclass.SubClassName, Subclass.SDesc,
Size.txtHeight, Size.txtWidth, Size.txtDepth, Class.ClassName,
Class.ClassDesc, Size.txtSize, Subclass.SDesc,
OrdersDetails.OrderDetailID
FROM ((CompMain INNER JOIN QuoteMain ON CompMain.CoID = QuoteMain.CoID)
INNER JOIN ContactMain ON QuoteMain.ContactID = ContactMain.ContactID)
INNER JOIN (Class INNER JOIN ([Size] INNER JOIN (OrdersDetails INNER
JOIN Subclass ON OrdersDetails.SubclassID = Subclass.SubClassID) ON
Size.SizeID = OrdersDetails.SizeID) ON Class.ClassID =
OrdersDetails.ClassID) ON QuoteMain.QuoteID = OrdersDetails.QuoteID;
It's only giving me the first invoice, not all of them, and I don't
understand why. I used the Nwind db as a guide so I don't see the
problem. Please help me find the problem!! There's one one-to-many
relationship which is QuoteMain to OrdersDetails by pk QuoteID (fk in
ordersDetails). I've tried changing the join, but that didn't help.
There are currently two invoices in the QuoteMain table (5201 and
5202). It's only pulling up 5201. TIA!
SQL:
SELECT QuoteMain.*, OrdersDetails.ClassID, OrdersDetails.SubclassID,
OrdersDetails.SizeID, OrdersDetails.Quantity, OrdersDetails.UnitPrice,
OrdersDetails.ExtPrice, OrdersDetails.LineNumber, OrdersDetails.Notes,
CompMain.CompanyName, CompMain.Address1, CompMain.Address2,
CompMain.City, CompMain.State, CompMain.Zip, CompMain.Phone,
CompMain.Fax, ContactMain.Salutation, ContactMain.FirstName,
ContactMain.LastName, Subclass.SubClassName, Subclass.SDesc,
Size.txtHeight, Size.txtWidth, Size.txtDepth, Class.ClassName,
Class.ClassDesc, Size.txtSize, Subclass.SDesc,
OrdersDetails.OrderDetailID
FROM ((CompMain INNER JOIN QuoteMain ON CompMain.CoID = QuoteMain.CoID)
INNER JOIN ContactMain ON QuoteMain.ContactID = ContactMain.ContactID)
INNER JOIN (Class INNER JOIN ([Size] INNER JOIN (OrdersDetails INNER
JOIN Subclass ON OrdersDetails.SubclassID = Subclass.SubClassID) ON
Size.SizeID = OrdersDetails.SizeID) ON Class.ClassID =
OrdersDetails.ClassID) ON QuoteMain.QuoteID = OrdersDetails.QuoteID;