I believe i found this procedure on this site somewhere.
Option Compare Database
Public bolpress As Boolean
Private Sub cmdHideRibbon_Click()
Dim strform As String
strform = "frmStartUp"
Select Case bolpress
Case False
DoCmd.SelectObject acForm, strform, True
DoCmd.ShowToolbar "Ribbon", acToolbarYes
bolpress = True
Case True
DoCmd.SelectObject acForm, strform, True
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Ribbon", acToolbarNo
bolpress = False
Case Else
bolpress = True
End Select
End Sub
Whenever I start database by holding the shift key and open the form it works like fine. Hides ribbon, hides the windows button. Only thing visible is the minimize, restore and close button. I think I can take care of that with a function.
My problem arises when I start the database by double clicking and the procedure does not react the same way: Hides navigation pane but not the ribbon or the windows button. Am I missing something here.
Thank you
Option Compare Database
Public bolpress As Boolean
Private Sub cmdHideRibbon_Click()
Dim strform As String
strform = "frmStartUp"
Select Case bolpress
Case False
DoCmd.SelectObject acForm, strform, True
DoCmd.ShowToolbar "Ribbon", acToolbarYes
bolpress = True
Case True
DoCmd.SelectObject acForm, strform, True
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Ribbon", acToolbarNo
bolpress = False
Case Else
bolpress = True
End Select
End Sub
Whenever I start database by holding the shift key and open the form it works like fine. Hides ribbon, hides the windows button. Only thing visible is the minimize, restore and close button. I think I can take care of that with a function.
My problem arises when I start the database by double clicking and the procedure does not react the same way: Hides navigation pane but not the ribbon or the windows button. Am I missing something here.
Thank you