Results 1 to 7 of 7
  1. #1
    Join Date
    May 2019
    Posts
    65

    Notation for Navigation Forms when using Queries

    I created several of my "stand-a-lone" forms. Then I created a navigation form "ShelterContactDatabase" and "input" all of those forms on the navigation tabs.
    All of the forms work except the ShelterSearch. It fails when it "calls" the ShelterMulti form which is outside of the navigation form. So, it tries to find the parameters instead of using those input into ShelterSearch. Note that all of these forms work fine outside of the navigation form.
    I have tried various forms of notation but none seem to work. The key I believe is in the Select Statement in the ShelterMulti form.

    I've attached a dummy database for your inspection.

    Also, how do I change my name from my email address to an alias.

    Thanks,
    Jeff
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    The nature of Navigation form is that only 1 subform is active at a time. So one subform cannot refer to another subform because the other subform isn't even available.
    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
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Shelter davegri-v01.zip
    Have a look at this. Since the search form is closed when the multi form is opened (and the recordsource depends on fields in the search form), you need to save the search items before closing the search form. I used tempvars to do that, and changed the recordsource for the multi form to look at those.

  4. #4
    Join Date
    May 2019
    Posts
    65

    Navigation Form/Subform notation

    Thank you Davegri for adding the VBA procedure, however I don't know VBA and have a hard time wanted to learn it at this point. I had previously added tempvars to the Macro event in ShelterSearch and changed the record source to point to the tempvars rather than the form fiels. The worked, BUT, I can't get the right notation to call the ShelterMulti form inside the ShelterContactProgram navigation form.
    It keeps going to the "external" ShelterMulti both in mine and yours. The program is currently in a state that can't Open the correct form I'm attaching my more recent access file with those tempvars.
    Any help is appreciated.
    Jeff
    Attached Files Attached Files

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Ah, I see, so it does go to the external form.
    Well, I would solve this by doing away with the search form and moving the search criteria fields to the ShelterMulti form itself in a form/subform setup. The criteria would go in the main form, the datasheet would be the subform, like now.
    Edit:
    Here's the DB with the above suggestion. The VBA from v01 is removed, replaced by embedded macros.
    The ShelterMulti form is removed from the Navigation tabs and is now the subform of the Search tab.
    Shelter davegri-v02.zip
    Last edited by davegri; 07-04-2019 at 09:15 AM.

  6. #6
    Join Date
    May 2019
    Posts
    65
    Hello,
    i did put the ShelterMulti on the ShelterSearch form and it works. However, I'm trying to open the form Shelter Main which is also in the Navigation form. I have tried several variations of "Forms![ShelterContactProgram]![ShelterMain]" in a macro from the ShelterMulti form, but it says that the Form is Mispelled or doesn't exist.

    Oh, and thank you for that suggestion.

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Got rid of the Navigation form and replaced with frmMain with tab control holding all the subforms. I think all your requirements are satisfied with this setup.
    Shelter davegri-v02.zip
    Last edited by davegri; 07-04-2019 at 10:12 PM. Reason: added attachment, duh

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

Similar Threads

  1. Replies: 3
    Last Post: 03-23-2016, 12:45 PM
  2. Navigation Buttons for Forms within Forms
    By Bkper087 in forum Access
    Replies: 1
    Last Post: 01-26-2015, 07:41 PM
  3. Replies: 9
    Last Post: 08-27-2014, 11:34 AM
  4. Replies: 0
    Last Post: 12-05-2013, 01:54 PM
  5. Replies: 1
    Last Post: 01-04-2011, 05:04 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