Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    2

    Question Unanswered: Newbie report question

    I've two tables

    One with:
    Players
    PlayerID - PK
    PlayerName

    Other:
    Games
    GameID - PK
    Player1_ID
    Player2_ID
    Player1_Score
    Player2_Score

    How do i make it appear in the Report, instead of Player1_ID and Player2_ID the PlayerName?

    My logic so far is something like: SELECT Players.PlayerName FROM Players WHERE PlayerID=Player1_ID;
    SELECT Players.PlayerName FROM Players WHERE PlayerID=Player2_ID;

    Make these 2 qrys and use them in the report instead of the Player1 and Player2 ID values.

    But, for 1, i've no idea how or where i put this query in the report, and 2 i've no idea how to associate 2 qrys to one report via wizard.

    HELP!

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Select the Query Builder button that pops up when you click onto the Record Source property for your report. From this builder you can add whatever tables you like and set whatever criteria is necessary. You can make your report dance......well, not really.


  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    PS: You may want to consider using only a single entry for each player in your games table. You can pull them together by game id later.

    Then your select query becomes:

    SELECT PlayerName, Score FROM Players INNER JOIN Games ON Players.Player_id = Games.Player_id
    WHERE Games.game_id = GAMEid_YOU_WANT_INFO_FROM_GOES_HERE
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •