Disabling the Shift Key Start Up Option

A

areo2002

Is there any way to disable the Shift Key Start Up option on Access 2007 or
modify it such that only one user can do it?

Once disabled, can it be reactivated?
 
D

Douglas J. Steele

It's an all-or-nothing proposition: you can't modify it for only one user.

Yes, you can turn the ability back on though.

What you need to do is create a database property named AllowBypassKey and
set it to False.

Sub SetStartupProperties()
ChangeProperty "AllowBypassKey", dbBoolean, False
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As DAO.Database, prp As DAO.Property
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
 
K

Klatuu

Well, you could limit it to a user if you check for a user id before
settting the property.
 
M

Mr. B

Here is a link that should help:

http://www.databasedev.co.uk/disable_shift_bypass.html

As for "only allowing one user to use it", I have to assume that your
applicaiton is being used in a multi user invironment. If so, I do hope that
you are using the Split front-end/backend method for deploying your
appliciaton. If this is true, then you could have a front-end that most
users use that has the shift key disabled and another copy of the front-end
that only specific users have that does not have the shift key disabled.

Yes, if you implement "disabling" of the shift key at startup, it can be
enabled again.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
D

Douglas J. Steele

Not sure what you're suggesting, Dave.

If the property exists (remember that it doesn't exist by default), it's
either True or False for all users who use the database. Setting the
property doesn't do anything until after you shut down the database and
reopen it.

Are you suggesting that you can control who can change the property or are
you suggesting something else that I'm missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top