glynnmack
Mechanical
- May 18, 2012
- 6
Hi all,
I'm building an access database to track documents required and received at different stages of a project. The query I'm designing is intended to create a record of the Equipment Type, Equipment Tag, and Document Type that was submitted with bid. Should be a pretty simple query, but although I only have 4 Documents, I'm getting 412 records. Am I missing something where the query is getting information from some related tables that I haven't listed in the query specifically? Is my query out of order?
SQL
SELECT tblProjectEquipment.EquipmentType, tblProjectEquipment.EquipmentTag, tblDocumentRec.DocumentType
FROM tblReqDoc, (tblProjectEquipment INNER JOIN tblDocumentRec ON tblProjectEquipment.EquipmentTag = tblDocumentRec.EquipmentTag) INNER JOIN tblSubmittalPackageRec ON (tblSubmittalPackageRec.Vendor = tblDocumentRec.Vendor) AND (tblSubmittalPackageRec.EquipmentTag = tblDocumentRec.EquipmentTag) AND (tblSubmittalPackageRec.SubmittalPackageID = tblDocumentRec.SubmittalPackageID) AND (tblProjectEquipment.EquipmentTag = tblSubmittalPackageRec.EquipmentTag)
WHERE ((([tblSubmittalPackageRec]![Bid])=-1));
Thanks!
I'm building an access database to track documents required and received at different stages of a project. The query I'm designing is intended to create a record of the Equipment Type, Equipment Tag, and Document Type that was submitted with bid. Should be a pretty simple query, but although I only have 4 Documents, I'm getting 412 records. Am I missing something where the query is getting information from some related tables that I haven't listed in the query specifically? Is my query out of order?
SQL
SELECT tblProjectEquipment.EquipmentType, tblProjectEquipment.EquipmentTag, tblDocumentRec.DocumentType
FROM tblReqDoc, (tblProjectEquipment INNER JOIN tblDocumentRec ON tblProjectEquipment.EquipmentTag = tblDocumentRec.EquipmentTag) INNER JOIN tblSubmittalPackageRec ON (tblSubmittalPackageRec.Vendor = tblDocumentRec.Vendor) AND (tblSubmittalPackageRec.EquipmentTag = tblDocumentRec.EquipmentTag) AND (tblSubmittalPackageRec.SubmittalPackageID = tblDocumentRec.SubmittalPackageID) AND (tblProjectEquipment.EquipmentTag = tblSubmittalPackageRec.EquipmentTag)
WHERE ((([tblSubmittalPackageRec]![Bid])=-1));
Thanks!