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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where To Input Module Code 2

Status
Not open for further replies.

Joel27

Programmer
Mar 28, 2001
23
US
I am trying to disable the shift key in my data base, but I need help in where the module should be put.

i'm using this code:

'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
 
You have a little misunderstanding. This code doesn't need to be run every time your database is opened. It only needs to be run once, before you make your database (or a copy of it) available to your users. You could run it in the Debug window (Immediate window in Access 2000).

This code creates a property that becomes a permanent part of the database. The property will remain set unless you change it later, with similar code. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top