Results 1 to 4 of 4
  1. #1
    Ramtrap is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Dec 2016
    Posts
    62

    Navigate Subform Records by Main ID

    Hi All,

    I have a form for creating a conference and a subform to populate the days of the conference, topics, etc.

    I want users to be able to add a new day to the conference (filling out appropriate fields, as applicable). That part I have down.

    I want them to be able to edit these fields as necessary as well through that form view. I can make 'Next' and 'Previous' buttons in that subform, however, it will cycle through ALL Conference Days rather than JUST that specific conference.

    Is there an easy filter I can set up, or would this require VBA, so that I am able to, for example, if I were to do the below in order:

    Create Conference A
    Create Days 1 and 2 for Conference A
    Create Conference B


    Create Days 1, 2, and 3 for Conference B
    Go back into Conference A and Create Day 3
    Then save that record and click the 'previous' button
    At this point, I want to see Day 2 for Conference A vice Day 3 for Conference B...make sense?

    Is that possible? I'd figure I could do this by setting a temp variable box and setting that as equal to the parsed-in Conference_ID, but no dice. Any help appreciated. Thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Have you set the subform container control Master/Child Links properties?
    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
    Ramtrap is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Dec 2016
    Posts
    62
    Well that partly helps in that I've identified this is not a subform

    I guess to be more accurate, what I have is one form (the main form to create conferences) and another form (the conference days). It's not placed on the main form but rather linked; the 'conference days' form opens as a popup.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Options:

    1. make it a subform - this is the easiest and no code required

    2. open the second form filtered by conference ID - this can be done by having the second form RecordSource query have a dynamic parameter (I never do this) or with macro or VBA code (I use VBA), regardless, will need code that populates the conference ID foreign key field when moving to a new record unless you want to rely on user to properly enter it
    Last edited by June7; 10-11-2017 at 06:52 PM.
    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: 1
    Last Post: 06-09-2013, 09:21 AM
  2. Replies: 9
    Last Post: 08-07-2012, 11:50 AM
  3. Changing records on Main and Subform
    By steve9495 in forum Forms
    Replies: 10
    Last Post: 07-14-2012, 01:46 PM
  4. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  5. Replies: 6
    Last Post: 11-05-2010, 10:11 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