How to modify a query in Access 2003 so that it references 2 tables?

I am developing an Access application in Access 2003 and I use a query as follows:

SELECT DISTINCT [REPORT NAME]
FROM tblBanks
WHERE [REPORT NAME] <> 'NA';

How would you modify this SQL statement to join tblBanks to another table titled tblOpenItems which also has a field titled [REPORT NAME] so that in addition to the above SQL SELECT statement that the [REPORT NAME] of tblBanks matches a [REPORT NAME] in table tblOpenItems ?
zimmer9Asked:
Who is Participating?
 
mbizupCommented:
SELECT DISTINCT [REPORT NAME], [and other fields as needed]
FROM tblBanks INNER JOIN tblOpenItems  ON tblBanks.[REPORT NAME] = tblOpenItems.[REPORT NAME]
WHERE [REPORT NAME] <> 'NA';

Open in new window

0
 
mbizupCommented:
Youd need to prefix the field REPORT Name:

SELECT DISTINCT tblBanks.[REPORT NAME], [and other fields as needed]
FROM tblBanks INNER JOIN tblOpenItems  ON tblBanks.[REPORT NAME] = tblOpenItems.[REPORT NAME]
WHERE tblBanks.[REPORT NAME] <> 'NA'; 

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.