Results 1 to 7 of 7
  1. #1
    steve7800 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    41

    How to link two continuous forms with VBA?

    I have a table of manufacturers. I have another table of products produced by those manufacturers.



    I would like to have a continuous form displaying manufacturers with a continuous subform displaying the products of the selected manufacturer, but, so far as I can determine from reading on the web, Access does not support both the main and subform being continuous.

    The https://support.microsoft.com/en-us/...a-215f5ec8bb39 web site describes how to link two forms using XML. It seems to work but I do not know XML and would rather not integrate something into my work which I do not understand and which would be difficult for me to maintain.

    Did not find any help on the internet in general or this site specifically. Although when I search accessforums.net for “linked forms” there are thousands of hits returned. I looked through the first several hundred and gave it up. Is there a better way to search? Seems likely this has been discussed before.


    So . . . how does one link two continuous forms with VBA? Not a main form/subform relationship but two standalone forms which are linked, in this case, by the mfrID field?


    Thanks.

    Steve

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    A main form with 2 continuous subs and nothing else? You would have to filter the product form with manufacturer form Current Event, using a field which needs to be common between them. Not sure if that makes sense to you.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Can you mock up a sample using terms like PorkyPig Mfg, DffyDuck Mfg... with products like Big wrench, little wrench, hammer, bolts.... and show us what your expected output would/should look like?

    What is the problem with form/subform for your application?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by steve7800 View Post
    I would like to have a continuous form displaying manufacturers with a continuous subform displaying the products of the selected manufacturer, but, so far as I can determine from reading on the web, Access does not support both the main and subform being continuous.
    I do this all of the time. If you create a main form with a sub form and set the linking Master/Child fields and both forms are set to "Continuous Forms", Access will complain and set one form (the main form I think) to "Single Form".
    Just go back and set both forms to "Continuous Forms". Done!

    Change the current record in the main form and the sub form changes to the show the linked records.





    If you have two stand alone forms, you can link them like this
    Attached Files Attached Files

  6. #6
    steve7800 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    41
    Thanks for the several suggestions.

    Three of you suggested looking at a form with two subforms, each subform continuous and linked via an intermediate text box. That works well and is straight forward to implement.

    ssnafu also provided an example database with two standalone forms linked through a query. This is what I have tried to do from time to time but never got it to work. So thanks for that ssnafu

    Also got some off-forum help from another accessforums member.

    So now I have two ways to link a pair of continuous forms. When I posted the question I had none. Big thanks to all of you!

    Steve

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Continuous forms updating all
    By musclecarlover07 in forum Access
    Replies: 15
    Last Post: 03-11-2014, 10:48 AM
  2. Viewing Continuous forms
    By scoe in forum Forms
    Replies: 9
    Last Post: 10-04-2013, 01:04 AM
  3. Replies: 1
    Last Post: 03-15-2012, 02:21 PM
  4. Replies: 2
    Last Post: 10-16-2009, 02:47 PM
  5. Replies: 3
    Last Post: 09-06-2008, 10:19 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