×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Access 2007- Query Repeating Records

Access 2007- Query Repeating Records

Access 2007- Query Repeating Records

(OP)
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!

RE: Access 2007- Query Repeating Records

Strip the query down to sections and see the results as you add sections. Your criteria is causing multiple records from at least one of the inner joins and it may be serveral inner joins are causing multiple records. You will have to look carefully at your data and your results.

RE: Access 2007- Query Repeating Records

(OP)
I found that I was creating a Cartesian product. Basically, the joins and order of my query (I was looking for EquipmentType in tblReqDoc that matched those in tblProjectEquipment, instead of vice versa) caused 4 records for each of the 103 matching records in tblReqDoc. Or so I think...

Anyway, thanks for your assistance!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources