Results 1 to 6 of 6
  1. #1
    tbeckett1211 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    3

    How To Make Macro that goes to a tab in the navigation form

    Hello, newbie here. So I managed to make two forms, one which allows me to scan a barcode and one that holds details about the products. So when I scan the barcode it automatically opens the form for products and selects the correct item. So far so good. But, I added the two forms among others to a navigation form. They display fine. But when I scan a barcode in the search form it just opens the products form in a new tab instead of opening the tab/form that is part of the navigation form. I can't figure out how to make a macro that instead of opening a new form, will just navigate to the specific tab of the currently open navigation form. Any ideas? Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    So does your code use OpenForm command?

    Post your code.

    I never use Navigation form. They can be more confusing to work with.
    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
    tbeckett1211 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    3
    This was the old code when it was two seperate forms, which worked fine....
    I ran this on the before update event when I scanned in a barcode and it automatically opened the other form and looked up the product
    Click image for larger version. 

Name:	help.png 
Views:	11 
Size:	7.8 KB 
ID:	41529

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, that is OpenForm command. If you don't want to open form then eliminate the command.

    You should either apply a filter to subform (review http://allenbrowne.com/ser-62.html) or go to desired record.
    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
    tbeckett1211 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2020
    Posts
    3

    ???

    Quote Originally Posted by June7 View Post
    Yes, that is OpenForm command. If you don't want to open form then eliminate the command.

    You should either apply a filter to subform (review http://allenbrowne.com/ser-62.html) or go to desired record.

    It is not a sub form though... it is a different tab on the same navigation form.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    It's still a form sitting on another form. Nature of Navigation form is only one subform at a time can be active. You may see multiple tabs but subforms are loaded into same container when called for by clicking tab. Referencing that subform must be through the container that holds it. Access defaults with the name "NavigationSubform"

    I don't use Navigation form.
    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. Help updating macro code to work in navigation form
    By NikoTheBowHunter in forum Access
    Replies: 10
    Last Post: 08-02-2017, 01:26 PM
  2. Replies: 5
    Last Post: 12-01-2016, 02:22 PM
  3. Replies: 1
    Last Post: 11-18-2014, 12:35 PM
  4. Replies: 1
    Last Post: 12-12-2013, 01:46 PM
  5. Replies: 1
    Last Post: 07-01-2013, 07:09 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