INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Access Howto:

How can I disable the shift key at startup? by rhicks
Posted: 19 Jul 00

How Do I Disable the Shift Key During Startup?

Read All Carefully Before Proceeding!!!!!!!!!

Here is two sub routines. One is to disable the shift key and the other is to re-enable the shift key.
You only need to call the disable code one time and the shift key will remain disabled until you run the Re-enable code.

The main thing to remember is that you need a way to run the Re-enable code from your open app, but you don't want the user to know how to do it. If you don't have a way to re-enable the shift key will have locked yourself out as well. I usually place a small transparent button on a screen that is seldom used by the user. I usually place the button in a corner where I know where it's at. The Re-enable code is called by the On Click event of this transparent button.

To run the disable the shift key code, you do something similar to the above approach or call the sub how ever you wish. The thing to remember is "Have a way to Re-enable the shift key".

Special Note...............
Make a backup of you db before you start.

'********************************************************
'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
'********************************************************


'********************************************************
'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
'********************************************************

HTH
RDH

Back to Microsoft: Access Other topics FAQ Index
Back to Microsoft: Access Other topics Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close