In Access 2007 and later no need to design the functions disable Shift Key, Navigation Bar, Auto Compact,... etc. Everything is in Curent Database setting.
The important thing to do is "Disable Ribbon Bar". After this work, User will not open "Curent DataBase".
Solution by me: kamikaze-2005 (Please keep this information when copying to other places)
Function in VBA Module Code (F11):
Trích dẫn:Function ShowRibbonBar(strAcToolBar As String)
Select Case strAcToolBar
Case "Yes"
DoCmd.ShowToolbar "Ribbon", acToolbarYes
Case "No"
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Case Else
MsgBox "ShowRibbonBar Permision use only Yes/No (string) value."
End Select
End Function
Use below function in AutoExec macro (Run Code) will Auto Disable Ribbon Bar
Trích dẫn: ShowRibbonBar("No")
Use below function will Enable Ribbon Bar.
Trích dẫn: ShowRibbonBar("Yes")
Note:
1. Remember design two button Enable/Disable select Click Event use macro (Run Code) before setting permision in the Current Database & reopen access file.
2. Compiler project to .Accde for VBA code to be executed without the "Enable Content"