2013 Access Ribbon Hide - How to

mikemenk

New member
Local time
Today, 14:17
Joined
Jun 19, 2014
Messages
2
Hi, I have a Form in 2013 Access that has the Ribbon and "File" button. I need to hide these options from the user so they don't screw up something. I particularly need to remove the print option more than anything else. I've read numerous post but I cant find anything for Access 2013. I'm a beginner.. Can anyone help?
 
Try...
Code:
CommandBars.ExecuteMso "MinimizeRibbon"
It should go in the On_Load event of the first Form in your database that opens.
 
Hi Gina, Thanks for your reply. I went into the properties of the Form and added a event procedure for "On Load". I entered the code, saved the file and re-opened in it as if I was the employee using it. The database still shows the "File" and "Home" toolbar with access full access. I'm not sure if I'm missing something or it didn't work. Below is my code.

Private Sub Form_Load()
CommandBars.ExecuteMso "MinimizeRibbon"
End Sub
 
Hmm, well perhaps you mean to turn the database into a Runtime? The above will only minimize the Ribbon not remove it. As for File and Home, yep distributing as a Runtime or creating your own Ribbon are your best options. (I thought that is what you meant by *hide*)
 
Last edited:
I found this awhile back. Hope it will help. It does fine on a couple applications I developed... :banghead:

MINIMIZE RIBBON IN ACCESS USING VBA CODE:

Public Function MinimizeRibbon(Optional MakeMin = True)
' This function minimizes or maximizes the ribbon, depending upon the value
' of MakeMin. True minimizes the ribbon and False maximizes the ribbon.
' The default value for MakeMin is True.
' MinimizeRibbon() Version 1.0.0
' Copyright © 2009 Extra Mile Data, www.extramiledata.com.
' For questions or issues, please contact support@extramiledata.com.
' Use (at your own risk) and modify freely as long as proper credit is given.
On Error GoTo Err_MinimizeRibbon
Dim blnIsMin As Boolean

' The Ribbon has a height of 147 when it is maximized.
' If it is maximized, set the blnIsMin value to False.
If Application.CommandBars.Item("Ribbon").Height = 147 Then
blnIsMin = False
Else
blnIsMin = True
End If

' If the current state is the same as MakeMin, then do
' nothing. Otherwise, toggle the ribbon by using Ctrl-F1.
If MakeMin = blnIsMin Then
' Do nothing.
Else
' Send the keystrokes and wait until they are processed.
SendKeys "^{F1}", True
End If
MinimizeRibbon = True
Exit_MinimizeRibbon:
On Error Resume Next
Exit Function
Err_MinimizeRibbon:
MsgBox Err.Number & " " & Err.Description, vbCritical, "MinimizeRibbon"
MinimizeRibbon = False
Resume Exit_MinimizeRibbon
End Function

COMMANDS TO HIDE NAVIGATION PANE AND RIBBON
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Ribbon", acToolbarNo

MDB VIEWER PLUS WEBSITE
http://www.alexnolan.net/software/mdb_viewer_plus.htm
 

Users who are viewing this thread

Back
Top Bottom