Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts
    NBS Microsoft Office Access 2007 (12.0.6423.1000) SP2 MSO (12.0.6425.1000)

    What VBA set option commands would I use in a startup module to automate the following manual steps when opening an Access 2007 database?

    Office Button
    , Access Options

    1. Popular Tab, Creating databases, set Default file format: Access 2000

    2. In Current Database Tab, in Application Options section, set Document Windows Options to Overlapping Windows

    3. In Current Database Tab, in Application Options section, check Compact on Close

    4. In Current Database Tab, set Ribbon and Toolbar Options, uncheck/clear Allow Full Menus check box

    5. In Current Database Tab, in Name AutoCorrect Options section, uncheck/clear Track name AutoCorrect info check box

    6. In Advanced Tab, in Editing section, Confirm, unckeck/clear Action queries

    7. In Advanced Tab, in Display section, Check Status Bar, unckeck/clear check box

    8. In Trust Center Tab, click Trust Center Settings button, Click Trusted Locations tab

    9. Add new locations:

    10. C:\Apps\Access2k\

    11. For each folder click Subfolders of this location are also trusted

    12. In Trust Center Tab, click Macro Settings button, Click Enable all macros (not recommended)

    Thanks, John
    11397335

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    If you do a Search in VBA Help for "Set option" you will be taken to this Dialog that spells out all the available options.

    [attachment=88383:setoptions.gif]
    Attached Images Attached Images
    Regards
    John



  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the information.

    Following is the code I used, however was not ableto automatically in code on startup In Trust Center Tab, click MacroSettings button, Click Enable all macros

    Has anybody been able to Enable all macros viacode in startup?

    Thanks, John



    mod_Set_Startup_Properties

    IfGetVersion = "12.0" Then

    Application.SetOption ("Auto Compact"), True

    Application.SetOption "Default File Format", 9 '=Access 2000, 10-2002, 11=2003, 12=2007

    ChangeProperty "Overlapping Windows", DB_Boolean, False 'True

    ChangeProperty "AllowFullMenus", DB_Boolean, True 'False

    ChangeProperty "AllowShortcutMenus", DB_Boolean, True

    ChangeProperty"StartupShortcutMenuBar", DB_Text, "(default)"

    ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False 'True

    EndIf


  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    John,

    Thanks for posting your solution.

    RG
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I don't think that any of the Trust Centre settings can be manipulated by Code. I think there is too much risk that such code could be used maliciously.
    Regards
    John



  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Agreed - I tried doing this to resolve an issue with run-time applications and their trusted locations, and didn't find anyone who had been successful at doing that.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •