N
Nathan Guill
Basically, I have infromation from 3 tables I would like to show in a
subform on a from from another table.
I have a form that shows me all of the Part Numbers, and its corresponding
information, on a form. On this form is a subform that will show me the
Drawings associated with this part number. The information for the drawings
are kept in three table (Customers, CSRs, and Drawings). I need to show
Drawings.Sketch, Customers.Name (from Customers.ID = Drawings.CustNum),
CSRs.Name (CSRs.ID = Customers.CSRID), and CSRs.Current (CSRs.ID =
Customers.CSRID).
This all seems pretty simple, yet when I try to create a query that has all
the elements needed to show the fields involved, I get an error (Type
mismatch in expression). What am I doing wrong?
Here is the SQL just in case it's a syntax problem:
SELECT CSRs.CSRID AS CSRs_CSRID, CSRs.Name, CSRs.Current, Customers.CustNum,
Customers.Company, Customers.CSRID AS Customers_CSRID, Drawings.[Index #],
Drawings.CustNumber, Drawings.PartNumber AS Drawings_PartNumber,
PartNumbers.PartNumber AS PartNumbers_PartNumber
FROM (CSRs INNER JOIN Customers ON CSRs.CSRID = Customers.CSRID) INNER JOIN
(PartNumbers INNER JOIN Drawings ON PartNumbers.PartNumber =
Drawings.PartNumber) ON Customers.CustNum = Drawings.CustNumber;
subform on a from from another table.
I have a form that shows me all of the Part Numbers, and its corresponding
information, on a form. On this form is a subform that will show me the
Drawings associated with this part number. The information for the drawings
are kept in three table (Customers, CSRs, and Drawings). I need to show
Drawings.Sketch, Customers.Name (from Customers.ID = Drawings.CustNum),
CSRs.Name (CSRs.ID = Customers.CSRID), and CSRs.Current (CSRs.ID =
Customers.CSRID).
This all seems pretty simple, yet when I try to create a query that has all
the elements needed to show the fields involved, I get an error (Type
mismatch in expression). What am I doing wrong?
Here is the SQL just in case it's a syntax problem:
SELECT CSRs.CSRID AS CSRs_CSRID, CSRs.Name, CSRs.Current, Customers.CustNum,
Customers.Company, Customers.CSRID AS Customers_CSRID, Drawings.[Index #],
Drawings.CustNumber, Drawings.PartNumber AS Drawings_PartNumber,
PartNumbers.PartNumber AS PartNumbers_PartNumber
FROM (CSRs INNER JOIN Customers ON CSRs.CSRID = Customers.CSRID) INNER JOIN
(PartNumbers INNER JOIN Drawings ON PartNumbers.PartNumber =
Drawings.PartNumber) ON Customers.CustNum = Drawings.CustNumber;