473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Access 2010 Navigation Forms DoCmd.BrowseTo Issue

hyperpau
184 Recognized Expert New Member
Hi All,

It's nice to be back.
I just got my hands on Access again and I was surprised that the magic is still there.

However, the new Navigation Forms in 2010, replacing the switchboard, is new to me. Nevertheless, I figured it out right away, except with one issue.

I can't seem to get the acDataMode to work!
No matter what I choose, acFormEdit, acFormAdd, asFormReadOnly, etc, access seem to ignore this and just simply browses to the form in normal mode.

Googled every possible keyword combination but I have found nothing. Not even on the MicroSoft site.

What am I supposed to do?
Am I missing something?

Expand|Select|Wrap|Line Numbers
  1. DoCmd.BrowseTo acBrowseToForm, "frmEmployee", "Main.NavSub", , , acFormAdd
Please help me. I am pulling my hair on this last piece of my program.

Thanks in advance. I hope the masters, like NeoPa, would be able to read this and help me out once again.
Mar 5 '14 #1
7 9210
topher23
234 Recognized Expert New Member
What is the context in which you're using this command? FWIW, I only know of two "issues" with BrowseTo. First and foremost, the form needs to be open in order for it to work (it isn't an implicit OpenForm). Second, if you are running data from a form and just trying to change the data mode of a subform on that form, entering the Path statement can cause it to fail. I think it's more likely that the second one is your issue, but without any other context I don't have a specific answer.
Mar 5 '14 #2
hyperpau
184 Recognized Expert New Member
Hi topher! Thank you very much for your attention.

You are correct. My concern is the second one.
The forms are already preloaded on to the different nav tabs of my nav form, so 'the form needs to be open in order for it to work' is covered. :)

So my issue really is that I want to change the data mode of my Form.

SO basically, the setup is this.

Main Form with a NavigationSubform

Inside the Navigation Subform, I have my forms frmEmployees, frmEvents, and frmModules preloaded.

I have a button on the Main Form which says 'Create New Employee record'.

What I want is that if I click that button, I want to browse to the Nav tab where frmEmployees is loaded, but I want to go there in Data Entry Mode.

What happens is that my acFormAdd is being ignored.
I am still routed to the right tab but I end up on the first record of the form. The frmEmployees does not have any subform. so basically, it's like MainForm.NavigationSubform > frmEmployees

How can I make the Data Mode work? Thanks.
Mar 6 '14 #3
topher23
234 Recognized Expert New Member
Since it's the second issue, try just using
Expand|Select|Wrap|Line Numbers
  1. DoCmd.BrowseTo acBrowseToForm, "frmEmployee", , , , acFormAdd
For some very strange reason not addressed by Microsoft, the PathToSubFormControl variable seems to override the DataMode. So, although it's not intuitive to leave the Path variable blank, it should fix the DataMode. Let us know if that solves the problem.
Mar 7 '14 #4
hyperpau
184 Recognized Expert New Member
Hi Topher,

The suggestion you gave works but it is not what I'm looking for.
What it did is it closed my Navigation Form and opened the frmEmployees in DataEntry mode, as if I used DoCmd.OpenForm.

What I wanted is to go to the Employees tab of my Navigation Form on DataEntry mode.

However, I found a workaround.
I deleted all pre-loaded forms on my Navigation Form's tabs and just left out 1 tab.

Now, the BrowseTo method simply loads my desired form onto the tab and the Data Mode loads correctly.
If I call on other forms using the BrowseTo method, it simply replaces the current form in the NavSub with the new form I call for.

It gets the job done, although I really wanted to have the forms already loaded on other tabs of my Nav Form.
Anyway to have this done? Thanks.
Mar 8 '14 #5
topher23
234 Recognized Expert New Member
I realized that the method I gave you (not giving the path) is actually a solution for when you call BrowseTo from inside the subform. However, I think I see now what the real issue is. When you specify the path to the subform, the BrowseTo statement expects a change in the SourceObject. However, since you're calling out the same form that is already loaded, it's not re-opening the subform in the new DataMode. The only way I can think of to change the DataMode in the way that you want is to first clear the SourceObject by using
Expand|Select|Wrap|Line Numbers
  1. Forms!Main!NavSub.SourceObject = ""
and then using your BrowseTo statement to refill the subform with the proper DataMode.
Mar 11 '14 #6
hyperpau
184 Recognized Expert New Member
The problem with this is that it changes the SourceObject of whichever is the active tab on the Navigation Form. Not really the Tab where that form is already pre-loaded.

So basically, it just acts the same way as deleting the tabs, and just having one tab in my Nav Form.
Mar 12 '14 #7
zmbd
5,501 Recognized Expert Moderator Expert
hyperpau

The problem is that the ACC2010 Navigation control is a new beast that is poorly documented:

Please read the following threads, I cover some of the aspects of the Navigation Control that you are haveing issues with -

Other than this first one, in no particular order:
[*]http://bytes.com/topic/access/answer...gation-control
>>(1) The navigation control, despite appering as a tab control really is not; therefor, the information contained within the article you posted to does not pertain.
[*]http://bytes.com/topic/access/answer...nt-tab-clicked
>>Read "Best Answer"
>>The remaining thead has some context on the control
[*]http://bytes.com/topic/access/answer...gation-control
>>THis will show you just how bad a lot of the reference material available on this control was (and to a great degree still is) when trying to learn the control. Also a simple solution to a complex question.

[*]http://bytes.com/topic/access/answer...-dialog-window
>> A work around for something you might run into, just keep this handy... it also has a few other links.
[*]http://bytes.com/topic/access/answer...ntrol-subforms
>>Read post #2 and Post#4 - I really should merge these two (^_^)

and I hope that this google-search return works the way it's supposed to as there are other threads here that cover this information too:
https://www.google.com/search?hl=en&...72.IgXDq15QtDE

I'm updating an old frontend to use this new control; thus, I've learned a lot about it thru the school of hard knocks. Any further questions let us know.
Mar 13 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alan Yim | last post by:
Hi folks, My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question...
0
by: araman | last post by:
Hello, I have a form and subform . The Main form contains four boxes to enter criteria for the query that fills the subform. Outside of the navigation form it works great. when i add it to the...
5
by: neelsfer | last post by:
I got a new work laptop last week with Access 2010 pre-loaded.I also installed the new Office 2010 service pack 1. I then loaded 2 of my regularly used Access 2007 + service pack 2 applications on...
9
by: Vernon Halsey | last post by:
I have an Access database that has been is use for approx 8 years. It was originally written in 2000 and subsequently converted to 2003. It consists of a client-unique front-end linked to a shared...
4
by: jbrumbau | last post by:
Hello, In Access 2010/2007, how do you prevent users from flipping into design view from the ribbon? I do not want to hide the entire ribbon (DoCmd.ShowToolbar "Ribbon", acToolbarNo) or even the...
3
by: john latona | last post by:
hi! i realize that access 2010 does not have the username and password function built into it, so i am trying to build it into my db. i have a "login form" with text fields titled username and...
3
AR Ratheesh
by: AR Ratheesh | last post by:
Hi, I have Access 2010 and When i'm trying to Export Text files to System folder ("C:\Windows\abc.asc"), in Windows 7 ultimate, couldn't export. But Previously i successfully exported to...
4
beacon
by: beacon | last post by:
Hi everybody, My title may not exactly describe my issue, so please forgive my lack of creativity today. I've got a database that was created in Access 2003 that I've opened in Access 2010. I...
11
by: Redbeard | last post by:
I have just upgraded to Access 2010 (64 bit) from Access 2007. There were a few minor issues in the database which I have resolved but this one piece of code just won’t work. I do not write VBA but...
5
Seth Schrock
by: Seth Schrock | last post by:
I have created a navigation form in Access 2010 using the horizontal tabs, 2 levels style. This form is my startup form. In the top row, I have to options. Under each option are several sub-tabs...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.