Query Help

G

Guest

It's the INNER JOIN's. If any of the tables in the joins don't have a
matching record, the query doesn't return the record. You need to try a
combination or two fo LEFT JOIN's from the primary key field of the parent
table to the foriegn key field of the child table.
 
D

DS

I have a Query with 5 Tables in it.

tblRestInfo
tblVoids
tblItems
tblVoidReasons
tblEmployees

When I have the tblVoids alone I get all of the information but when I add
the other tables to fill in the information I get nothing. Here is my code.

SELECT tblINFO.RestaurantName, tblINFO.RestID, tblChecks.ChkAlias,
tblVoids.VoidDate, tblVoids.VoidTime, tblVoids.VoidQTY, tblItems.ItemName,
tblVoids.VoidAmount, tblVoidReasons.VoidName, [EmpFirstName] & " " &
[EmpLastName] AS MAN
FROM tblINFO, (((tblVoids INNER JOIN tblItems ON tblVoids.VoidItemID =
tblItems.ItemID) INNER JOIN tblVoidReasons ON tblVoids.VoidReasonID =
tblVoidReasons.VoidNameID) INNER JOIN tblChecks ON tblVoids.VoidCheckID =
tblChecks.CheckID) INNER JOIN tblEmployees ON tblVoids.VoidManagerID =
tblEmployees.EmployeeID;

Any help is appreciated.
Thanks
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top