Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation Control, BrowseTo randomly errors

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
0
0
GB
Hi,

I am having major problems with a Navigation Control.

I have on the main form 'Check_Docs' the following UpdateView routine...

Code:
Public Sub UpdateView(Optional ByVal bClear As Boolean = False)
    
On Error GoTo err_updateview

    Me.EmailInfo = Null
    
    If bClear Then
        If Not (oFileWatcher Is Nothing) Then
            oFileWatcher.CancelWatcher = True
        End If
        Set oFileWatcher = Nothing
        Me.SetFocus
        DoCmd.BrowseTo acBrowseToForm, "Emails_Log_Subform", "Check_Docs.Nav_Subform"
    End If
    
    
exit_updateview:

    Me.Refresh
    Exit Sub

err_updateview:
    MsgBox "Error in Check_Docs_UpdateView : " & Err.Description
    Resume exit_updateview
    
End Sub

This works 9/10 but occasionally I get the following error
The macro action BrowseTo requires a valid Path argument. A valid Path argument is of the form: MainForm1.Subform1>Form1.Subform1

Why? Either the BrowseTo syntax is right or it's wrong, how can it be wrong only occasionally?

I know I'm not using a chevron in my path "Check_Docs.Nav_Subform", I don't quite understand the syntax with the chevron, what is it asking for?

The mainform is 'Check_Docs' the Navigation control is 'Nav_Subform, their isn't any more child depth to the control, what would come after any potential chevron?

The control I wish to auto load / navigate to (form linked to the specific nav button - 'Navigation Target Name') is 'Emails_Log_Subform'

Help understanding why this happens randomly and the potential cause is appreciated.

1DMF



"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Well I gave the button control on the Navigation control the same name as the form being used as the Navigation Target Name and the error hasn't happened again?

Very odd!

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top