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!

Urgent !!! Shift key disabling 1

Status
Not open for further replies.

MattBegg

Programmer
Jan 19, 2001
42
CA
Looking at the FAQ on disabling the shift key looks great, but if you have a button to re-enable the shift key, how can you automatically disable the shift key again in a database that has been distributed Regards

Matt

matt@begg-uk.co.uk
 
Check out the "AllowBypassKey property" help topic in Access.
 
Try executing the following code from a module:

Sub SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "Cover"
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, False
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
ChangeProperty "AllowFullMenus", DB_Boolean, True
ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
ChangeProperty "AllowSpecialKeys", DB_Boolean, False
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
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

You will notice that the shift key has been bypassed. Use
Control + Bloq Shift to gain access to your Full Menus.
 
You can actually change the ShiftKey property from an external database. I have a small sample db that will do this for Access 97. You only have to enter the path to the database, and choose to lock or unlock it. If you would like a copy of this, email me and request it. I will be happy to send a copy to you.

HTH
RDH Ricky Hicks
ricky@athree.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top