| re: AllowByPassKey error
On 27 Jul 2005 08:05:34 -0700, "TechBoy" <ronnolan@msn.com> wrote:
[color=blue]
>RE: Access 2002
>
>When my app starts up I am trying to set the F11 key to a disabled
>state so users cannot press it to see the DBWindow.
>
>Here is the error:
>error msg: 3270-property not found
>
>Here is the line of code the debugger stops at:
>---CurrentDb.Properties("AllowBypassKey").Value = Enable---
>
>Intellisense recognizes when I type "CurrentDB.properties", but how
>come it would not allow a "allowbypasskey" to be used here?
>
>I examined Tools/References and the ones I have listed for this app
>that are checked are (and they're in this order):
>1."Visual Basic for Applications"
>2."Microsoft Access 10.0 Object Library"
>3."OLE Automation"
>4."Microsoft DAO 3.6 Object Library"
>5."Microsoft ActiveX Data Objects 2.6 Library"
>6."Microsoft Excel 10.0 Object Library"
>
>With regard to "MyProblemApp.mdb" above, I have another older copy of
>this same app "MyGoodApp.mdb" that uses the same exact code in the same
>exact place, and the same 6 references are listed in the same order on
>both apps.
>
>If anyone has insights as to why "MyProblemApp" has this error and how
>to correct it would be helpful.
>
>Thank you.[/color]
Sub LockDatabase()
Dim db As Database
'REM out options not required
On Error Resume Next
Set db = CurrentDb()
'turns all security properties on and blocks access to DB window
ChangeProperty "StartupShowDBWindow", dbBoolean, False
ChangeProperty "StartupShowStatusBar", dbBoolean, False
ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
ChangeProperty "AllowFullMenus", dbBoolean, False
ChangeProperty "AllowShortCutMenus", dbBoolean, False
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False
Set db = Nothing
On Error GoTo 0
End Sub |