Results 1 to 3 of 3
  1. #1
    claff319 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    1

    Populating a sub form

    I was wondering if it could be possible to populate all the players from a team to a subform for a softball statistical database..My tables are currently set up as follows:

    Player: (playerID, teamID, playername, etc)
    Team: (teamID, leagueID, teamname, etc)
    League: (leagueID, name, etc)


    Games: (gameID,Date,Time, teamID 1, teamID 2)
    Season: (seasonID)
    HittingStats: (playerID, gameID, seasonID, PA, 1B, etc)

    Currently i have a set of dynamic combo boxes. After the user chooses which league the team is associated with, the Team combo box re-queries to the teams specific to that league. From there i was wondering if it is possible to populate a subform with the players that are specific to that team picked within the combo box. The subform is for the teams hitting stats, which would populate the subform with all the players on that team, allowing the user to just input the stats and not worry about inputting every single playerID. Thanks for the help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Why do you have a subform? What is its relationship to main form? Are Master/Child properties of the subform container set? Filter main form to a team and the subform of related players will synchronize. If there is no linking between main and sub forms, apply filter to subform. Can use expression in Filter property of subform [TeamID] = Forms!mainform!listbox, then have code in list or combo box AfterUpdate event to toggle FilterOn property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Why would you want to do this when members of a team may not play (injured, didn't attend, didn't play, etc) Wouldn't you end up with a bunch of blank data during the course of a season?

    What you're asking to do can be done you'd just have to perform an append query once your team was chosen that added all the records to your stats table then refreshed the contents of the subform but it's not a very good practice.

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

Similar Threads

  1. Populating a form with table data!
    By Extracash in forum Forms
    Replies: 6
    Last Post: 09-13-2010, 05:47 AM
  2. Auto populating Form controls
    By eww in forum Forms
    Replies: 1
    Last Post: 08-09-2010, 12:49 PM
  3. PLEASE HELP - Two tables populating one form
    By intergnat1 in forum Forms
    Replies: 2
    Last Post: 03-17-2010, 07:20 AM
  4. Form data not populating in table
    By sabrown in forum Forms
    Replies: 0
    Last Post: 08-27-2009, 08:19 PM
  5. Self-populating one form from another
    By winter in forum Forms
    Replies: 7
    Last Post: 08-03-2009, 08:02 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