?
Solved

Access 2010 Code to Reference Navigation Form

Posted on 2014-01-02
10
Medium Priority
?
2,626 Views
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

Or

[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.
David
0
Comment
Question by:dhemple
[X]
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
10 Comments
 
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"
0
 

Author Comment

by:dhemple
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?

Thanks
0
 

Author Comment

by:dhemple
ID: 39751598
More points.  I'm in a time crunch.  Anyone?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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?
0
 

Author Comment

by:dhemple
ID: 39751613
Navigation form name is "MainMenu"
0
 
LVL 120

Expert Comment

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


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


.
0
 

Author Comment

by:dhemple
ID: 39751683
capricorn,

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?
0
 
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

http://msdn.microsoft.com/en-us/library/office/ff196381.aspx
0
 

Accepted Solution

by:
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
NavigationSubform
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

Forms![NavigationForm].Form![NavigationSubform].Form![Subform3]![Control]

Thanks for trying to help with my question.
0
 

Author Closing Comment

by:dhemple
ID: 39809815
my solution spells it out
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

765 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