Results 1 to 15 of 15
  1. #1
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11

    Creating A Form to List Teams - Please Help

    Hi All,

    I am trying to create a form where I can access queries by using a combo box and bring up data on 2 teams on the the same screen. I have attached the database to this post.

    The database opens up to the form I am trying to design. I have added the combo box at the top so you can see what I am trying to achieve - I know it wont work the way it is setup! I would like to select 2 teams from the combo box(s) and have those teams data appear so that I can add comments when recruiting.

    If anyone could help me with how I can do this I would be very grateful.



    Thanks

    Andy

  2. #2
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    sounds like homework to me

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Spinny,
    If it is not homework, then let us know with what specific issue you are having a problem and we'll try and help.

  4. #4
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    unfortunately its my job to set this up so not homework.... i basically want to be able to select a team from the combo box at the top of the page and that teams details to fill the form below. I cant figure out how to do this. If anyone could help that would be great.

    thanks

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    First off, fill in some dummy details for the teams so you have some records to work with. Then use the ComboBox wizard to create another cbo in the header and pick Option #3 when the wizard asks. You should really have AutoNumber PrimaryKeys in your tables.

  6. #6
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    ok I have done that but there are two problems

    1. There are 15 players on each team. Is there a way to stop the combo box displaying the same team 15 times.

    2. All I want on the screen is the 15 players from team A. I seem to get everyone in the DB

    Thanks so much for the earlier help

    Andy

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How many records do you have in your RecordSource?

  8. #8
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    2-3000 records
    75-200 teams
    Fields are

    ID (Primary Autonumber)
    Team Name
    First
    Last
    Number
    Grad Year
    Comments
    Rating

    I can send you the DB with data if you want to have a look at it - its 704k

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the SQL for the RowSource of your ComboBox?

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need at least one more table, PLAYERS. I'm not sure what NFC stands for but the records in there now seem to be players on teams. Are the team names, names for the teams in the TEAMS table? If so then that is the table where the team names belong, in another field in that table. I've also added an AutoNumber PrimaryKey field to the TEAMS and RATINGS tables.

  11. #11
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    thank you for looking at that for me. im almost there. there are two things that i still cant figure out.

    1. If I select DALLAS on the combo box at the top of the page I only want the players who play for DALLAS to show up.

    2. I need to be able to see 2 teams on the same screen - i.e. if PRINCETON are playing DALLAS I need to get one on the left and one on the right. Is this possible?

    I have attached the DB as it is now

    Thank you so much for your time.
    Andy

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is the Team field in the Players table used for? If it is one of the teams in the Teams table then it should be a LongInteger field with the TeamID in it and *not* a text field with the name. In a RDBMS the data should only be in one table. The other tables have a ForeignKey pointing to the record in the other table. What happened to the names like Barracudas and Beach Premier Breakers? If those are the names of the teams then I would have added a field to the Teams table.

  13. #13
    spinny is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2009
    Posts
    11
    The data that was in the original table was wrong. The team names for the tournament are in the TEAMS table (16 Teams). The PLAYERS table refers to all the players who are at the tournament but also has the team that they play for as I don’t know how to link the two tables and work with the TEAMID field as you suggested. The RATINGS table is just a simple lookup combo box for rating these players.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I removed the Team field from the Players table and added a TeamID field and populated it with the FK from the Teams table. Look at the qryPlayers and you will see everything put back together.

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I lost track of this thread. Is it solved Andy?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Open form from a drop down list
    By ildanach in forum Forms
    Replies: 15
    Last Post: 05-21-2009, 05:40 AM
  2. Replies: 0
    Last Post: 12-01-2008, 03:01 PM
  3. Creating a list viewed by 2 criteria
    By phillyon in forum Queries
    Replies: 0
    Last Post: 12-01-2008, 11:46 AM
  4. Open Form with a drop down list box
    By Rinehart in forum Forms
    Replies: 0
    Last Post: 08-10-2008, 08:53 PM
  5. Problems with list or combo box on tabbed form
    By kydbmaster in forum Forms
    Replies: 0
    Last Post: 02-20-2008, 01:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums