NavigationSubform RRS feed

  • Question

  • I have a form called frmNavigation.  It was created using the form template for navigation.  It has the NavigationSubform control, which states its type as subform or subreport.  The control has several forms as targets.  All I want to do is requery and refresh one of those forms.  I have this: 


    based upon one of the posts I found on this site.  It is the only combination of code that does not throw errors.  However, it does nothing. 

    Any time i try to reference the target form by name, an error message tells me the form cannot be found.  I have tried looping through NavigationSubform controls to find any acform contained in that collection and assign it to a form object.  The code finds none.

    Please advise me on how to reference this form so I can requery/refresh it. 

    Thank you.

    Wednesday, May 1, 2019 6:26 PM

All replies

  • Hi. Navigation Forms only have one subform control, so when you requery it, you are refreshing the currently displayed/selected subform because all the other tabs are not loaded. In other words, Access only loads one subform at a time - when you click on the tabs.
    Wednesday, May 1, 2019 7:47 PM
  • Thank you for the response. Even if/when the form was open and displayed in the navigation form, any code anywhere, module, popup, dialog, that refreshed the navigation form navigationsubform control would not requery and/or refresh it.  I did think of a work-around, however.  The form I wanted refreshed was calling a popup to get values and then update the view of the form that called it.  I made the popup open modal and put the code that refreshes in the calling form event.  Because the popup is now modal, the code does not continue until the modal closes, giving the user the opportunity to update values and then see them updated.  Worked like a charm.  Sometimes the best way is not the way we want to do it.
    • Edited by lucyjava Wednesday, May 1, 2019 11:32 PM
    Wednesday, May 1, 2019 11:27 PM
  • Hi. Congratulations! Glad to hear you found a solution. Good luck with your project.
    Thursday, May 2, 2019 2:59 PM