Hi,
I know this question has been asked before, and I have read the faq about this, but I don't know what to do with it.
I have this application in access, called supply management. The application starts with the form frmLogon. But when a user opens the application with shift+enter, the whole database is shown, which should not happen.
This code is suggested in the faq:
-----------------------------------
'This Code Disables the Shift Key'Public Sub DisableByPassKeyProperty()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
---------------------------
But where should I put this code? Behind frmLogon where the application starts with?
Also, certain users should be able to see the whole database. The faq suggest this to re-enable the shift key:
--------------------------
'This Code Re-enables the Shift Key'Public Sub EnableByPassKeyProperty()
Dim db As Database
Set db CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub
------------------
But again, where should I put this code? Behind a button on the switchboard of those users (they have different switchboard)?
Any help would be really appreciated!!!
Thanks a lot in advance,
dj
I know this question has been asked before, and I have read the faq about this, but I don't know what to do with it.
I have this application in access, called supply management. The application starts with the form frmLogon. But when a user opens the application with shift+enter, the whole database is shown, which should not happen.
This code is suggested in the faq:
-----------------------------------
'This Code Disables the Shift Key'Public Sub DisableByPassKeyProperty()
Dim db As Database
Dim prp As Property
Set db = CurrentDb
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
db.Properties.Append prp
End Sub
---------------------------
But where should I put this code? Behind frmLogon where the application starts with?
Also, certain users should be able to see the whole database. The faq suggest this to re-enable the shift key:
--------------------------
'This Code Re-enables the Shift Key'Public Sub EnableByPassKeyProperty()
Dim db As Database
Set db CurrentDb
db.Properties.Delete "AllowByPassKey"
db.Properties.Refresh
End Sub
------------------
But again, where should I put this code? Behind a button on the switchboard of those users (they have different switchboard)?
Any help would be really appreciated!!!
Thanks a lot in advance,
dj