I have some code in a module that will not work UNLESS I put in a MsgBox just before the code that's running.
This is the code:
Private Sub Form_Open(Cancel As Integer)
SendKeys "{F11}"
MsgBox "Welcome to the Request Tracker", , "Request Tracker"
'select the navigation pane
Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
'hide the selected object
Call DoCmd.RunCommand(acCmdWindowHide)
'hide the tool ribbon
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub[/FONT]
I'm trying to close the navigation pane and the toolbar, and the code works--but only if that MsgBox is there before it.
Does anyone have any idea why this might be?
Thanks,
Hank
This is the code:
Private Sub Form_Open(Cancel As Integer)
SendKeys "{F11}"
MsgBox "Welcome to the Request Tracker", , "Request Tracker"
'select the navigation pane
Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
'hide the selected object
Call DoCmd.RunCommand(acCmdWindowHide)
'hide the tool ribbon
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub[/FONT]
I'm trying to close the navigation pane and the toolbar, and the code works--but only if that MsgBox is there before it.
Does anyone have any idea why this might be?
Thanks,
Hank