Changing Access Options by Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello Everybody

I want to change << Tools\options\Default Database Folder >> by code in
VBA code window in Office2003 .
How can I do this ?
 
Here's a little code I've used for years. Allows you to set nearly all
of the options in Access. Before use, recommend verifying all the
options as some may not be set the way you want.

-----
''KEYBOARD OPTIONS
SetOption "Behavior entering field", 1
SetOption "Arrow Key Behavior", 1
SetOption "Move After Enter", 1
SetOption "Cursor Stops at First/Last Field", False
SetOption "Ime Autocommit", False
SetOption "Datasheet Ime Control", False

''VIEW OPTIONS
SetOption "Show Status Bar", True
SetOption "Show Startup Dialog Box", False
SetOption "Show New Object Shortcuts", False
SetOption "Show Hidden Objects", True
SetOption "Show System Objects", True
SetOption "ShowWindowsInTaskbar", False
SetOption "Show Macro Names Column", True
SetOption "Show Conditions Column", True
SetOption "Database Explorer Click Behavior", 1

''GENERAL OPTIONS
SetOption "Left Margin", 0.5
SetOption "Right Margin", 0.5
SetOption "Top Margin", 0.5
SetOption "Bottom Margin", 0.5
SetOption "Four-Digit Year Formatting", False
SetOption "Four-Digit Year Formatting All Databases", False
SetOption "Track Name AutoCorrect Info", True
SetOption "Enable MRU File List", False
SetOption "Provide Feedback with Sound", False
SetOption "Auto Compact", True
SetOption "Default Database Directory", "C:\"

''EDIT/FIND OPTIONS
SetOption "Default Find/Replace Behavior", 0
SetOption "Confirm Record Changes", True
SetOption "Confirm Document Deletions", True
SetOption "Confirm Action Queries", False
SetOption "Show Values in Indexed", True
SetOption "Show Values in Non-Indexed", True
SetOption "Show Values in Remote", False
SetOption "Show Values Limit", 5000

''ADVANCED TAB
SetOption "Ignore DDE Requests", False
SetOption "Enable DDE Refresh", True
SetOption "Default Open Mode for Databases", 0
SetOption "Default Record Locking", 2
SetOption "Use Row Level Locking", True
-----
 
Back
Top