union query for text box?

J

JohnLute

I have a form with the following query. How can I create one form text box
that
will display [OverflowCapacity] per [txtProfileID] record? Do I need a union
query for the text box? Thanks for your help!

SELECT tblProfiles.*, tblProfilesClassPK.Class, tblProfiles.Type,
tblPKBTGLPhysicalAttributes.OCUOM,
tblPKBTPLPhysicalAttributes.OverflowCapacity,
tblPKBTPLPhysicalAttributes.OCUOM,
tblPKCPPhysicalAttributes.OverflowCapacity, tblPKCPPhysicalAttributes.OCUOM,
tblPKDRPhysicalAttributes.OverflowCapacity, tblPKDRPhysicalAttributes.OCUOM,
tblPKPKMSPhysicalAttributes.OverflowCapacity,
tblPKPKMSPhysicalAttributes.OCUOM,
tblPKTHPhysicalAttributes.OverflowCapacity, tblPKTHPhysicalAttributes.OCUOM
FROM ((((((tblProfiles LEFT JOIN tblPKBTGLPhysicalAttributes ON
tblProfiles.txtProfileID = tblPKBTGLPhysicalAttributes.txtProfileID) LEFT
JOIN tblPKBTPLPhysicalAttributes ON tblProfiles.txtProfileID =
tblPKBTPLPhysicalAttributes.txtProfileID) LEFT JOIN tblPKCPPhysicalAttributes
ON tblProfiles.txtProfileID = tblPKCPPhysicalAttributes.txtProfileID) LEFT
JOIN tblPKDRPhysicalAttributes ON tblProfiles.txtProfileID =
tblPKDRPhysicalAttributes.txtProfileID) LEFT JOIN tblPKPKMSPhysicalAttributes
ON tblProfiles.txtProfileID = tblPKPKMSPhysicalAttributes.txtProfileID) LEFT
JOIN tblPKTHPhysicalAttributes ON tblProfiles.txtProfileID =
tblPKTHPhysicalAttributes.txtProfileID) INNER JOIN tblProfilesClassPK ON
tblProfiles.txtProfileID = tblProfilesClassPK.txtProfileID
WHERE (((tblProfilesClassPK.Class)="PK") AND ((tblProfiles.Type)="BTGL" Or
(tblProfiles.Type)="BTPL" Or (tblProfiles.Type)="CP" Or
(tblProfiles.Type)="DR" Or (tblProfiles.Type)="IM" Or (tblProfiles.Type)="PL"
Or (tblProfiles.Type)="PP" Or (tblProfiles.Type)="TD" Or
(tblProfiles.Type)="TH"));
 

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