dawsonrhodes
Member
- Local time
- Today, 17:18
- Joined
- Mar 8, 2020
- Messages
- 85
Hey guys,
I've got a database that I'm building that will be used by hundreds of people per day, per property at my company. To limit the possibility of design changes etc, I've created a login screen and on startup have disabled basically every menu and toolbar, as the database is made to be navigated solely by the use of buttons.
What I'd like, and already have, is a button that prompts for a password, which then allows me to edit and tinker as I please.
I am aware that the shift key will bypass any settings, but once I solve this issues, I intent on disabling this to ensure max security and privacy of records and design.
So in short, what I need is a command in VBA that enables the shortcut menus (the right click on objects in the left nav panel that has design view, layout, properties, etc.)
Here's what I have so far, minus the code for this setting I am asking for.
Thanks guys!
I've got a database that I'm building that will be used by hundreds of people per day, per property at my company. To limit the possibility of design changes etc, I've created a login screen and on startup have disabled basically every menu and toolbar, as the database is made to be navigated solely by the use of buttons.
What I'd like, and already have, is a button that prompts for a password, which then allows me to edit and tinker as I please.
I am aware that the shift key will bypass any settings, but once I solve this issues, I intent on disabling this to ensure max security and privacy of records and design.
So in short, what I need is a command in VBA that enables the shortcut menus (the right click on objects in the left nav panel that has design view, layout, properties, etc.)
Here's what I have so far, minus the code for this setting I am asking for.
Code:
Private Sub btnEXAMPLE_Click()
Dim x As Integer
For x = 1 To 1
Dim strInput As String, strMsg As String
strMsg = "Enter Management Password"
strInput = InputBox(prompt:=strMsg, title:="Password Required", xpos:=2000, ypos:=2000)
If strInput = "PASSWORD" Then
CurrentDb.Properties("ShowDocumentTabs").Value = True
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.SelectObject acTable, , True
Exit Sub
Else
Dim msg, style, title, response
msg = "Password Incorrect"
style = vbOKOnly + vbExclamation
title = "Password error"
response = MsgBox(msg, style, title)
End If
Next x
Exit_Command3_Click:
Exit Sub
End Sub
Thanks guys!