To disable the database window view via the shit key.
You will need to billed a second database only you have access to it with
the following code.
Make a Public Funtion:
Public Function ChangeShift(strMDBName As String, fChange As Boolean)
On Error GoTo ChangeShift_Err
Dim db As Database, prp As Property
Set db = DBEngine(0).OpenDatabase(strMDBName)
db.Properties("AllowBypassKey") = fChange
ChangeShift_Done:
MsgBox "The proper"
Set db = Nothingty 'AllowBypassKey' from" & vbCrLf _
& strMDBName & " was changed successfully to '" _
& fChange & "'", vbInformation, "ChangeShift"
ChangeShift_End:
Set prp = Nothing
GoTo Function_End
ChangeShift_Err:
If Err = 3270 Then
Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, _
fChange, True)
db.Properties.Append prp
GoTo ChangeShift_Done
Else
MsgBox "Error # " & Err & " @@" & Err.Description, _
vbExclamation, "Error"
End If
Resume ChangeShift_End
Function_End:
End Function
Then add this code to a command button on click event to diable the "shift
enter"
Private Sub cmdPromptL_Click()
ChangeShift InputBox("Please Enter a Path to the Database.", "Lock"), False
End Sub
Then add this code to a command button on click event to enable the "shift
enter".
(You will want this so you can edit the database.)
Private Sub cmdPromptU_Click()
ChangeShift InputBox("Please Enter a Path to the Database.", "UnLock"), True
End Sub