aziz rasul
Active member
- Local time
- Today, 21:28
- Joined
- Jun 26, 2000
- Messages
- 1,935
I have found the following code, which is placed behind two command buttons on an opening form.
When I press the cmdDisableSHIFTKey button and close the db and then open it, the db window still appears. I'm using Access 2010.
Code:
Private Sub cmdEnableSHIFTKey_Click()
Dim db As Database
Set db = CurrentDb
db.Properties.Delete "allowbypasskey"
db.Properties.Refresh
End Sub
Private Sub cmdDisableSHIFTKey_Click()
Dim db As Database
Dim prp As Property
On Error GoTo ErrorHandler
Set db = CurrentDb
Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False)
db.Properties.Delete "AllowBypassKey"
db.Properties.Append prp
ErrorHandler:
If Err.Number = 3265 Then
Resume Next
End If
End Sub
When I press the cmdDisableSHIFTKey button and close the db and then open it, the db window still appears. I'm using Access 2010.
Last edited: