Hi
Using the AllowBypassKey = False simply will not work to secure a database.
It may work to stop people pressing the shift key by mistake when they open
the DB and seeing “stuff†they don’t understand. But it will NOT stop anyone
from getting the entire DB, if they want to ?
Almost everyone one this forum will know how to get round the remove of the
Shift Key Startup option (2 weeks ago I got into my sister's database as she
did just done what you did and couldn't get into her own application?) , so
don’t use this as any form of security. But, up to you ;-)
If you realise this and just want to stop people pressing the shift key to
see the design by mistake (I would also use the start up options to assist
with this) then you should just disallow the shift key and then put a
password on the switchboard to allow it, if needed. You could then give the
users you want to see the design the password.
******************
To follow on from John Spencer's idea of a back-door (or in this case a
simple button) have a look at this - try it on a practice DB and if you're
happy with it (I would change all the mesages for a start
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
put it on a
copy of your main DB - make a back up 1st ???
Note
This will disable to shift key and allow you (or anyone else with the
password) to reset it) but it will NOT (in anyway) secure the database.
For this I have used
"INSERT PASSWORD HERE"
as the password - without the commas, I would change it if I were you
Create a button (called KarensButton) on your switchboard. Put this OnClick
Private Sub KarensButton_Click()
On Error GoTo Err_KarensButton_Click
Dim strSomeThing As String
Dim strMsg As String
Beep
strMsg = "You can enable the Shift Key by putting in the password into the
box" _
& vbCrLf & vbLf & "Warning" & vbCrLf & vbLf & _
"If you change the codes and design functions in this database" _
& vbLf & "it may become unworkable and you could lose all the data" _
& vbLf & vbLf & "If you don't have the password, please contact me."
strSomeThing = InputBox(Prompt:=strMsg, Title:="Message from Karen")
If strInput = "INSERT PASSWORD HERE" Then
'Karen - Change the above to what you want BUT DON'T FORGET IT
![Smile :-) :-)](/styles/default/custom/smilies/smile.gif)
SetProperties "AllowBypassKey", dbBoolean, True
Beep
MsgBox "Next time you open the Database, hold down the Shift key.", _
vbInformation, "Message from Karen - Correct password"
Else
Beep
SetProperties "AllowBypassKey", dbBoolean, False
MsgBox "Incorrect Password!" & vbCrLf & vbLf & _
"You can't use this shift key.", _
vbCritical, "Message from Karen"
Exit Sub
End If
Exit_KarensButton_Click:
Exit Sub
Err_KarensButton_Click:
MsgBox "Runtime Error # " & Err.Number
Resume Exit_KarensButton_Click
End Sub
Give it a try and let us know if you have problems - am sure someone will be
able to help
Good luck