Hi
Below is some code I have used to control some aspects of after runtime. This is called in the autoexec macro, but the dbase has to opened twice for the process to work (first time sets, then the second acts on the new settings). One of those is the availability of toolbars.
Pls note that I also use a global constant "DB_TEST_MODE" (in the mdlUtilities module) to set these - I find it handy when moving/testing between development and production. The properties are set to tru when in development (DB_TEST_MODE = True), making it easy to restore my settings.
Hope this helps
Cheers
S
Function SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
Const frmStartup As String = "frmSubjectsMainForm"
ChangeProperty "StartupForm", DB_Text, frmStartup
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, True
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, mdlUtilities.DB_TEST_MODE
ChangeProperty "AllowFullMenus", DB_Boolean, mdlUtilities.DB_TEST_MODE
ChangeProperty "AllowBreakIntoCode", DB_Boolean, mdlUtilities.DB_TEST_MODE
ChangeProperty "AllowSpecialKeys", DB_Boolean, mdlUtilities.DB_TEST_MODE
ChangeProperty "AllowBypassKey", DB_Boolean, mdlUtilities.DB_TEST_MODE
End Function