VBA to switch between Navigation Subforms associated with a Navigation Control (1 Viewer)

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 13:27
Joined
Jul 5, 2007
Messages
586
Access 2013 x86 running on Windows 10

I have a form ("Front") which contains a NavigationControl ("NavigationControl0")

"NavigationControl0" contains buttons to select (load) between 3 different subforms:
"Welcome"
"ImportData"
"ExportData"

When the "Front" form is opened, the default view of the NavigationControl is the "Welcome" subform.

Whenever I use the buttons in the NavigationControl, the associated subform is loaded and that subform's OnLoad event is triggered.


The problem:
On the "ImportData" subform there is a button to initiate the data import processes.
That works fine.
However, I want the "Welcome" subform to be "activated" or "selected" (or whatever the correct term is) such that the user would then see the "Welcome" subform instead of the "ImportData" subform.

I can't figure it out.
I've tried a basic DoCmd.OpenForm but the subform is just opened on top of (in addition to) the "Front" form instead of just selecting the "Welcome" subform.

PLEASE HELP

I've never worked with NavigationControls before and so far I'm not liking it.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:27
Joined
Feb 19, 2002
Messages
43,277
The Navigation form works the way it works. PERIOD. If you don't want to work that way, then don't use the Navigation form. It is not helping you. It is simply interfering with how you want to work.

Make your own unbound form with a tab control that you can use to hold the various subforms you are using. You can allow all the subforms to load at once or you can take more control over when they load the way the Navigation Form does. But, unlike the Navigation Form, your custom form will be able to have multiple subforms open at once.

Most experts don't use the Navigation form due to its limitations. We understand that loading many subforms can make a form heavy but we also know as we are building the application, which need to interact with others so we can control which load with precision which the Navigation Form cannot do because it is generalized. It's like expecting your cell phone to be even close to as good as a professional camera.

Personally, I don't like the/a Navigation Form as a menu. I far prefer to use a custom version of the A2002 Switchboard.
 

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 13:27
Joined
Jul 5, 2007
Messages
586
The Navigation form works the way it works. PERIOD. If you don't want to work that way, then don't use the Navigation form. It is not helping you. It is simply interfering with how you want to work.

Make your own unbound form with a tab control that you can use to hold the various subforms you are using. You can allow all the subforms to load at once or you can take more control over when they load the way the Navigation Form does. But, unlike the Navigation Form, your custom form will be able to have multiple subforms open at once.

Most experts don't use the Navigation form due to its limitations. We understand that loading many subforms can make a form heavy but we also know as we are building the application, which need to interact with others so we can control which load with precision which the Navigation Form cannot do because it is generalized. It's like expecting your cell phone to be even close to as good as a professional camera.

Personally, I don't like the/a Navigation Form as a menu. I far prefer to use a custom version of the A2002 Switchboard.
Thanks but I don't really have a choice.
I'm upgrading (fixing a different problem) in an existing database.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:27
Joined
Feb 19, 2002
Messages
43,277
Well, you have an answer so you can move on, but if you ever build a new application, then you can make an informed decision regarding whether or not to use a Navigation Form.
 

Users who are viewing this thread

Top Bottom