Upload
jaein
View
220
Download
0
Embed Size (px)
Citation preview
7/27/2019 Bypass Shiftkey Password - SharePoint Hill
1/3
pass Shiftkey Password - SharePoint Hill
s://sites.google.com/site/sharepointhill/tutorials/msaccess/bypass-shiftkey-password[01/06/2013 01:30:42 AM]
Certifi
Search this site
Home
Contact Us
Tutorials
SharePoint
Access
Excel
SQL Server
Dynamics CRM
GoToMeeting
Tutorials >Access >
Bypass Shiftkey Password
The concept is that a form that has the ability to disable the Shift Key design view mode is password protected.
This way only the designated users with the password can access the design view mode using the Shift Key.
Create a form that can be used as a starting point that all other forms (as needed) can be accessed from.
cations
Change the database settings so the form noted in step 1 is the startup form that is opened automatically when the
database is opened.
Don't forget to remove the Tools/Menus/Navigation Options that you don't want the user to have (i.e. uncheck
Display Navigation Pane & uncheck Allow Full Menus.
Template tips
Learn more about working with
templates.
How to change this sidebar.
Currently, you need to press the Shift Key while opening the database to access the design view mode.
Create a module called ByPassShiftKey with the following code:Option ExplicitOption Compare Database
Public Function SetProperties(strPropName As String , varPropType As Variant , varPropValue As Variant ) As Integer
https://sites.google.com/site/sharepointhill/homehttps://sites.google.com/site/sharepointhill/tutorials/mssphttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sharepointhill/tutorials/sql-serverhttps://sites.google.com/site/sharepointhill/tutorialshttps://sites.google.com/site/sharepointhill/tutorialshttps://sites.google.com/site/sharepointhill/tutorialshttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sitetemplateinfo/tipshttps://sites.google.com/site/sitetemplateinfo/tipshttps://sites.google.com/site/sitetemplateinfo/tips/customize-your-site-sidebarhttps://sites.google.com/site/sharepointhill/tutorials/mssphttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sharepointhill/tutorials/sql-serverhttps://sites.google.com/site/sharepointhill/tutorialshttps://sites.google.com/site/sharepointhill/tutorials/msaccesshttps://sites.google.com/site/sitetemplateinfo/tipshttps://sites.google.com/site/sitetemplateinfo/tips/customize-your-site-sidebarhttps://sites.google.com/site/sharepointhill/home7/27/2019 Bypass Shiftkey Password - SharePoint Hill
2/3
On Error GoTo Err_SetProperties
Dim db As DAO.Database, prp As DAO.Property'Dim db As adodb.Database'Dim db As Database,'Dim prp As adodb.Property
Set db = CurrentDbdb.Properties(strPropName) = varPropValueSetProperties = TrueSet db = Nothing
Exit_SetProperties:Exit Function
Err_SetProperties:IfErr = 3270 Then 'Property not foundSet prp = db.CreateProperty(strPropName, varPropType, varPropValue)db.Properties.Append prpResume NextElseSetProperties = FalseMsgBox "SetProperties", Err.Number, Err.DescriptionResume Exit_SetPropertiesEnd IfEnd Function
Create a form that can be used Disable/Enable Shift Key Design View Entry.
Create a button on the new form (frm_menu_DBA) with the On Click event as follows:Option ExplicitOption Compare Database
Private Sub cmd_Open_input_ByPassShiftKey_Click()On Error GoTo Err_bDisableBypassKey_Click'This ensures the user is the programmer needing to disable the Bypass KeyDim strInput As StringDim strMsgAs StringBeep'strMsg = "Do you want to enable the Bypass Key ?" & vbCrLf & vbLf & _
'"Please key the programmer's password to enable the Bypass Key."'strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")Dim QI As IntegerQI = MsgBox("Do you want to disable the shift key?", vbYesNo)IfQI = 7 Then'If strInput = "pk" Then
SetProperties "AllowBypassKey", dbBoolean, TrueBeepMsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _"The Shift key will allow the users to bypass the startup options the next time the database is opened.", _vbInformation, "Set Startup Properties"
ElseBeepSetProperties "AllowBypassKey", dbBoolean, False'MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf &_'MsgBox "Bypass Key Disabled!" & vbCrLf & vbLf & _"The Bypass Key was disabled." & vbCrLf & vbLf & _"The Shift key will NOT allow the users to bypass the startup options the next time the database is opened.", _vbCritical, "Invalid Password"Exit Sub
End If
Exit_bDisableBypassKey_Click:Exit SubErr_bDisableBypassKey_Click:MsgBox "bDisableBypassKey_Click", Err.Number, Err.DescriptionResume Exit_bDisableBypassKey_ClickEnd Sub
Create a button or image on the main startup form (frm_menu_Startup) with the following code for the On Click
event:Option ExplicitOption Compare Database
Private Sub Auto_Logo0_Click()Dim sPwd As String , strMsg As String
strMsg = "Please Enter Your Password"sPwd = InputBox(Prompt:=strMsg, _Title:="Form Security Check", XPos:=5000, YPos:=4000)
Select Case sPwd
Case "my!password" 'This is the passwordDoCmd.OpenForm "frm_menu_DBA", acNormal, , , acFormReadOnly
Case ElseMsgBox "Sorry, Wrong Password Entered. Please TryAgain"
End SelectEnd Sub
7/27/2019 Bypass Shiftkey Password - SharePoint Hill
3/3
Go ahead & close the database, then re-open. You should see the main startup form. Now click the "image" &
enter the password into the dialog box.
This will open the DBA menu. Click the button to either Disable or Enable the Shift Key Design View Entry.
Yes = Shift Key Won't WorkNo = Shift Key Will Work
Clicking Yes will show the following image:
If you open the database while holding the Shift Key, you WILL NOT enter design mode.
Clicking No will show the following image:
If you open the database while holding the Shift Key, you WILL enter design mode.
SharePoint Hill
Sources:
Not another ms- access page! Albert D. Kallal
ShiftKeyDB.accdb (344k) Tammy Hill, Jun 5, 2012, 11:45 AM v.1
Comments
You do not have permission to add comments.
Sign in | Report Abuse | Print Page | Remove Access | Powered By Google Sites
http://www.kallal.ca/msaccess/msaccess.htmlhttp://www.kallal.ca/msaccess/msaccess.htmlhttps://sites.google.com/site/sharepointhill/system/app/pages/admin/revisions?wuid=wuid:gx:652f46e742e46f7https://sites.google.com/site/sharepointhill/system/app/pages/admin/revisions?wuid=wuid:gx:652f46e742e46f7https://www.google.com/a/UniversalLogin?service=jotspot&continue=https://sites.google.com/site/sharepointhill/tutorials/msaccess/bypass-shiftkey-passwordhttps://www.google.com/a/UniversalLogin?service=jotspot&continue=https://sites.google.com/site/sharepointhill/tutorials/msaccess/bypass-shiftkey-passwordhttps://sites.google.com/site/sharepointhill/system/app/pages/reportAbusehttps://sites.google.com/site/sharepointhill/system/app/pages/reportAbusehttps://sites.google.com/site/sharepointhill/system/app/pages/reportAbusehttps://sites.google.com/site/sharepointhill/system/app/pages/removeAccesshttps://sites.google.com/site/sharepointhill/system/app/pages/removeAccesshttp://sites.google.com/http://www.kallal.ca/msaccess/msaccess.htmlhttps://sites.google.com/site/sharepointhill/system/app/pages/admin/revisions?wuid=wuid:gx:652f46e742e46f7https://www.google.com/a/UniversalLogin?service=jotspot&continue=https://sites.google.com/site/sharepointhill/tutorials/msaccess/bypass-shiftkey-passwordhttps://sites.google.com/site/sharepointhill/system/app/pages/reportAbusehttps://sites.google.com/site/sharepointhill/system/app/pages/removeAccesshttp://sites.google.com/