Results 1 to 2 of 2
  1. #1
    intransit2 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    4

    Populate a subform with data


    Situation: I wish to automate a process to associate a given student in a class with one of 3 different training schedules contained in separate tables. I currently use a form (student info)/subform (training schedule) and copy/paste the training schedule data from the appropriate table into the subform. I would like to automate this process so that users could select a training schedule for an individual using an options button and have the subform populate with the data from the appropriate table. If this is possible in VBA, what would the code look like?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Recommend, in order of my preference:

    1. combine the 3 tables into one Schedules table and filter the dataset - 3 identical tables is indicator of poor db design

    or

    2. have 3 subforms set as not visible and use VBA code to manage which one is made visible to the user

    or

    3. VBA code sets the RecordSource property of the subform - never actually tried this one
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-30-2011, 07:19 PM
  2. Populate table/subform from VBA
    By degras in forum Forms
    Replies: 3
    Last Post: 03-03-2011, 10:59 AM
  3. how to populate a subform from table
    By Dengkee in forum Programming
    Replies: 1
    Last Post: 10-18-2010, 08:09 AM
  4. Replies: 0
    Last Post: 05-12-2010, 10:08 PM
  5. How to populate a subform using a record set
    By new2access123 in forum Forms
    Replies: 5
    Last Post: 03-01-2010, 10:32 PM

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