Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enabling

Status
Not open for further replies.

DanSc0tt

MIS
Sep 17, 2001
30
DE
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
 
You will have to exit the db before the shift key is disabled.
When i ran it i got an error so i changed the
dim prp as property to:
dim prp as dao.property

Make sure you have code to enable the shift key also.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top