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

i have disabled the use acess speci

Status
Not open for further replies.

roamer762

MIS
Aug 16, 2002
26
0
0
MT
i have disabled the use acess special keys from the tools / startup options,but if i open the msacess with the shift key pressed i can still access the database window...is there a way where no one can "touch" the tables and queries.?.the mde only applies to forms and modules
 
If you choose Tools, STartup, Advanced, disable 'Use Access special Keys'

Hope this helps.
 
Disabling the access special keys does not disable the shift key. Below is code that I use to disable the shift key. BE CAREFUL!!! Once you run this code and exit the database, you will no longer be able to enter it and modify anything. I suggest that you make a copy of the database before you run this code and keep the copy in a safe place. I hope this is what you are looking for.



Sub SetBypassProperty()
Const DB_Boolean As Long = 1
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top