Link to home
Start Free TrialLog in
Avatar of pinkstonm
pinkstonm

asked on

getting fields from 2 tables on a report

I have a simple table that has names and addresses for our youth sports league.  Rather than adding a couple fields for the coaches information we wanted to create a seprate table with that information in it and link it back in the reports.  The comon link would be coach name however one coach could coach more than one team.

How do I link the tables up so that when I create a report I can access fields from both tables.

I am a novice access user
Avatar of berg1375
berg1375

First create your coaches table, with all of the fields you need for the coaches info. Then you will need to add the coaches field to the league table. This is where you will add the coaches name to the league table, and hold all of the coaches information in the coaches table.

 You can then define relationships between the 2 tables by right clicking in the Tables window and select relationships. Select the 2 tables you want to relate, and then drag the coaches field from the coaches table to the coaches field of the second table. I would recommend making the coaches name a primary key in the coaches tbale. This way you can get the One to Many relationship that you want.

With this relationship you will have the coaches name present in the second table so you will not need to add the coaches table to the query for the report. IF you want to select certain records from the league table create a query to set the criteria, else you can just run a report based off of the league table. Either way the coaches name will be available. If you need the coaches information you will need to create a query with both tables and then base the report off of that query.

HTH
berg
Just a note to add to : berg1375.  It is better to use the ID key from the coach table rather than a name.  This removes the possibility that you may get to coaches witht the same name.  Also you will get a numerical Index rather than text.

malcolm
ASKER CERTIFIED SOLUTION
Avatar of Country_Gal
Country_Gal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Country Gal-

Since you are new here you may not know the etiquite for EE. When you post an answer, it locks the question, and decreases the visibility. Thus scaring some experts away from commenting. Post as a comment, and if the questioner uses your comment they will accept it as the answer and all are happy.

HTH
berg