Solved

Access 2010 Code to Reference Navigation Form

Posted on 2014-01-02
10
2,249 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
  • 6
  • 4
10 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
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
 
LVL 119

Expert Comment

by:Rey Obrero
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 119

Expert Comment

by:Rey Obrero
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 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now