X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Browse To Navigation Failing, Access 2010    
post Feb 13 2018, 07:00 PM

Posts: 10
Joined: 5-February 16

Hello All,

I have an Access DB which uses the navigation system, it has been working quite well for years, but recently it has started giving me problems when using the BrowseTo command.

The main form contains 2 row navigation, the upper row buttons do not navigate anywhere, they simply filter the 2nd row navigation and it is from the 2nd row of buttons that the navigation occurs. This works fine.

All the navigation from the main form is to various subforms which are also set up as navigation forms, meaning a lot of navigation is 2 levels deep, occasionally 3, but no more. All the navigation from the forms themselves works perfectly.

I have a custom ribbon which includes some navigation shortcuts to commonly used forms which has previously also worked without fault, however recently I have added a new search form, there was previously a ribbon shortcut to an older search form but I wanted to redirect it to the new form.

Well that shouldn't be a problem should it, I just changed the target form name and navigation path in the callback routine. Simple huh?

Apparently not, I now get the error 6054 complaining that the path argument was invalid. Oh alright, I must have mucked it up, so I checked it again - no I'm sure it was right. Close and restart Access, same error.

Check the path again, copied the form name from the navigation pane in case I mis-typed it and same with the navigation form name. Didn't help. Changed the navigation back to the original search form - yep that worked okay, no error.

Put it back to the new form, back to the same error only this time I noticed something new, even though the error occurs, I see the top level button on the main form being highlighted like the navigation is trying to work. Just out of interest I then clicked the ribbon button again after dismissing the error, lo and behold it works.

So what's going on here? I thought I had a pretty reasonable grasp of navigation in Access but I don't really understand this behaviour. Clearly the navigation path is correct or the second button click would simply produce the same error. Following along with that reasoning, I navigated to another form in the same navigation branch as the new search form and tried the ribbon shortcut and it works fine, but if I then go to a different navigation branch and try the ribbon shortcut it fails.
The code is
DoCmd.BrowseTo acBrowseToForm,"frmAccSearch","frmMain.NavigationSubform>frmAccountsNav.NavigationSubform"

If I have the frmJobsNav as the active subform of frmMain then the BrowseTo command fails
Whereas if I have the frmAccountsNav subform of frmMain active the command works.

Both frmAccountsNav and frmJobsNav are subforms of the frmMain at the same level and allow navigation to various list, detail and search forms.

I've not encountered this before, I have tried to replicate this in another dummy DB but was unable to, the navigation works as expected. Apologies for the rambling nature of my explanation, but can anyone enlighten me what I'm doing wrong?

Go to the top of the page
post Mar 1 2018, 09:25 AM

Posts: 891
Joined: 25-April 14

have you tried the simple:

DoCmd.openform "frmAccSearch"
Go to the top of the page
post Mar 12 2018, 09:25 PM

Posts: 10
Joined: 5-February 16

The DoCmd.OpenForm does work if I run it from the immediate window, the form is opened as a standalone form as you'd expect.

But it's not clear to me how that helps... This is a navigation style interface.
Go to the top of the page
post Apr 20 2018, 02:13 AM

Posts: 10
Joined: 5-February 16

Okay, just an update should anyone wind up with a similar problem.

I have recreated the DB as a new file although I imported the objects from the old file. But the Navigation issue seems to have resolved itself so I'm going to put it down to a corrupting file - though I'm not sure how as it exhibited no other problems.
Go to the top of the page
post Apr 20 2018, 05:53 AM

Posts: 1,184
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)

Excellent! Happens a lot. Copying my DB to a new one is like 6th on my list of things to try when your DB is not making sense, but it is a keeper.... Glad you found it.

Sometimes the DB corruption occurs in the system part of your DB that you cannot see....so, very possible you would have no indicators at all.
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    23rd February 2019 - 08:13 AM