[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Access 2010 Code to Reference Navigation Form

Posted on 2014-01-02
Medium Priority
Last Modified: 2014-01-26
Hello Experts.

I have the following reference code that works on a form created with several subforms attached.

Forms![frm_PremierProductLaunchPlanner]![frm_PremierProductLaunchPlanner_SubFrm_FDB].Form!txtSearchBrandName = Null


[Forms]![MainForm]![SubForm].Form![Control] = Null

I wanted to clean up the look of the database, so I created a Navigation form and placed all the forms onto the new Navigation form.

How do I reference the Navigation form in the above code to get it working again?

Thank in advance for your help.
Question by:dhemple
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39751437
you will use this command to view "FormX"

DoCmd.BrowseTo acBrowseToForm, "FormX", "Navigation Form1.NavigationSubForm"

Author Comment

ID: 39751459
Hello capricorn and thank you for your response.

I'm a bit confused with your response.  It doesn't take much for me.

I was looking for a code change to my original working code that would include the new navigation form that I dropped all other forms/subforms onto.

I tried things like

Forms![NavigationForm]![frm_PremierProductLaunchPlanner]![frm_PremierProductLaunchPlanner_SubFrm_FDB].Form!txtSearchBrandName = Null

but this does not work.  I have other code within the form where I would have to make similar changes.  Any ideas on how to get the existing code to work with newly created navigation form?


Author Comment

ID: 39751598
More points.  I'm in a time crunch.  Anyone?
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39751607
<I was looking for a code change to my original working code that would include the new navigation form that I dropped all other forms/subforms onto.>

the code i posted above will do it.

what is the name given to your navigation form?

Author Comment

ID: 39751613
Navigation form name is "MainMenu"
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39751642
try this, to view form "frm_PremierProductLaunchPlanner"

DoCmd.BrowseTo acBrowseToForm, "frm_PremierProductLaunchPlanner", "MainMenu.NavigationSubForm"


Author Comment

ID: 39751683

Thanks for your responses and trying to help me, but I'm not seeing how this is going to help me.

I'm not trying to view a form on the navigation form, I'm trying to reference a control within the navigation's forms, subform, subform to be used else where.

Is there any way to reference the navigation form [MainMenu] in the code below so that I can reset the value of control to NULL?

Forms![frm_PremierProductLaunchPlanner]![frm_PremierProductLaunchPlanner_SubFrm_FDB].Form!txtSearchBrandName = Null

As I mentioned, I have other code simular to this that I'll need to change so that it properly references the navigation form.

Any thoughts on how to reference properly?
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 1000 total points
ID: 39751693
<Thanks for your responses and trying to help me, but I'm not seeing how this is going to help me.>

i am trying to show you how to navigate to forms that are inside the Navigation Form, that is the first step to navigate thru the controls inside the forms/subforms.

better see this link for reference


Accepted Solution

dhemple earned 0 total points
ID: 39751914
I found the answer I was looking for.

When I created the Navigation form and named it [MainMenu], I was only referencing form [MainMenu] and the subforms that I pulled into this form within my code.  What I failed to realize was that when I created the Navigation form it created a subform within it called [NavigationSubform].

Form Hierarchy:
NavigationForm  = MainMenu
Subform2  = [frm_PremierProductLaunchPlanner]
Subform3 (within subform2) = [frm_PremierProductLaunchPlanner_SubFrm_FDB]

I also found when referencing a control within Subform3, I don’t have to reference Subform2.  I believe this is because the Navigation form sees Subform2 and Subform3 as individual forms and not within one another.

Here’s the code that will work


Thanks for trying to help with my question.

Author Closing Comment

ID: 39809815
my solution spells it out

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question