Access 2010 Code to Reference Navigation Form

Posted on 2014-01-02
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?
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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 250 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

732 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