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: 8
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

Custom Search
RSSSearch   Top   Lo-Fi    21st February 2018 - 04:26 AM