"Laetitia" <nospam@devdex.comwrote in message
news:49133b69$0$89879$815e3792@news.qwest.net...
Quote:
>
Hi All
>
Is there any way to prevent someone from using the Shift ket to bypass
the Startup options ?
>
Thanks in advance for your assistance.
Laetitia
>
>
*** Sent via Developersdex
http://www.developersdex.com ***
ChangeProperty "AllowBypassKey", dbBoolean, True
Calling the following function will after the MDB is closed and reopened
Keep backup copy incase you lock yourself out.
Check help for "AllowBypassKey" for more information
'---------------------------------
' Change the selected property
'
Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As Database, prp As 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