Results 1 to 1 of 1
Thread: SQL Query with associative table
May 10, 2009, 16:38 #1
- Join Date
- Mar 2009
- 0 Post(s)
- 0 Thread(s)
SQL Query with associative table
Here is a screenshot of the relationship window for what i am talking about:
What i would like to do is the following:
By clicking a button in the form when the current record is a Player, a report will pop up giving information related to that players parent. This information should be address, phone and email.
I know how to do program a button to display a report for that specific Member. For this it will be:
Private Sub ParentInformation_Click()
Dim strWhere As String
strWhere = "Members.[Member ID] = " & Me.[Member ID]
DoCmd.OpenReport "Players Parents", acViewPreview, , strWhere
I am however, very confused on the SQL statement that will give me these results.
My current query, which is totally wrong is:
SELECT Members.[Member ID], Members.[Last Name], Members.[First Name], Members.[Street], Members.[City], Members.[State], Members.[Zipcode], Members.[Home Phone], Members.[email]
WHERE EXISTS (Select * from Parent_Player where Parent_Player.[Player ID] = Members.[Member ID]);
anyone familiar with writing queries for associative tables that could help?