Load form with navigation from another form

ilanray

Member
Local time
Today, 19:05
Joined
Jan 3, 2023
Messages
129
Hi
I have to forms. one form is with subform and navigation with 3 buttons let's call it "A-form" and the other form is regular form let's call it "b-form"
When I fill the details ib b-form, I would like to close the form and open "a-form" in the 2nd botton called "NavigationButton9" and in the subform called "F-Title" I would like to load the id of the parameter from the "b-form"
than I gave more to do but for now this is what i would like to have

regards,
 

Attachments

  • 1672911444166.png
    1672911444166.png
    48 KB · Views: 102
use DoCmd.BrowseTo command
here is a demo. Open B-Form first (as in your example).
 

Attachments

Last edited:
I have no idea what arnelgp's example does. he never tells us and I don't have time to open it and look. If you want one subform you have loaded into a navigation form to pass data to a different subform, you have to save the data in a hidden control on the navigation form or create a tempvar that can be accessed throughout the application. Then when your navigation form opens the other form, it reads the hidden control or the tempvar to obtain the necessary information.

The simplest (no code) way to filter the subform is to use a query as te rowSource of the subform and have it get its criteria from the hidden control on the navigation form.

Where SomeField = Forms!yournavigationform!yourhiddencontrol

If this field has not been populated, the query will return no records so if you open A before B, then A's subform will be empty.

I know the navigation form is "cool" but I don't ever use it because I don't like how it works. It works the way it does (only one subform ever loaded at one time) for the sake of efficiency but there are other options. An actual menu usually works better.

Also, I don't like the structure because you have one form depending on another form but you can't control the order in which the forms are opened.
 

Users who are viewing this thread

Back
Top Bottom