I am trying to use the excellent bit of code on the faqs to disable the bypass key.
I have called it from the Open event of the form that I have got startup to start, it calls:
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
However, it momentarily opens the form and then closes it again!! and more importantly iot does not diable the key!!!
any ideas???
Ta
Dan
I have called it from the Open event of the form that I have got startup to start, it calls:
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
However, it momentarily opens the form and then closes it again!! and more importantly iot does not diable the key!!!
any ideas???
Ta
Dan