Did you change the password from what I had? (Sheba9)
You could post the dB for me to look at.....
Cheer up...you're making progress.....
Did you change the password from what I had? (Sheba9)
You could post the dB for me to look at.....
Cheer up...you're making progress.....
WHY is this code not allowing me to use the SHIFT ByPass key? First it wasn't working and now, it's working overtime
Private Sub dDisableBypassKey_DblClick(Cancel As Integer)
On Error GoTo Err_bDisableBypassKey_Click
Dim strInput As String
Dim strMsg As String
Beep
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")
If strInput = "my password here" Then
CurrentProject.Properties.Add "AllowBypassKey", True
Beep
MsgBox "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"
Else
Beep
CurrentProject.Properties.Add "AllowBypassKey", False
MsgBox "Incorrect ''AllowBypassKey'' Password!" & 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 Sub
Err_bDisableBypassKey_Click:
MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description
Resume Exit_bDisableBypassKey_Click
End Sub
oh! just seen your update. no, I used a more dramatic password than that but it was the only thing I changed. The code is like a fortress, can't get past it even when I give the correct password
hmm some progress!![]()
Well, you wanted to lock the dB. And you are learning what NOT to do
Your code doesn't look like what I provided. I don't know what you are using.
In a standard module, do you have the function SetProperties()???
This is a very important piece of code. It actually does the locking and unlocking. And it creates the property if it doesn't already exist.
And I don't know what this line is doing:
It seems to be trying to add a property named "AllowBypassKey". But from my reading the "CurrentProject" object is read only.Code:CurrentProject.Properties.Add "AllowBypassKey", True
From HelpYou can use the CurrentProject property to access the CurrentProject object and its related collections, properties, and methods. Read-only CurrentProject object.
I hope you were working on a test copy of your dB! I think you might be locked out......![]()
hey Steve. I finally got it to workI had the SetProperties function you gave me but somehow used a different subroutine with it. Big learning curve for me
Thank you very much for your help and patience
![]()
Congratulations![]()