[AccessD] Access 2007: Set Database Options in Code

MartyConnelly martyconnelly at shaw.ca
Sat Jun 30 16:51:04 CDT 2007


Inline below

See also:   Look through the url links in blog questions here

Clint Covington: Microsoft Office Access Blog
Do you like the new navigation pane?
http://blogs.msdn.com/clintcovington/archive/2007/06/07/do-you-like-the-new-navigation-pane.aspx

Change Access 2007 database options for your application
http://articles.techrepublic.com.com/2415-10878_11-88582.html?tag=nl.e056

Gale Perez wrote:

>I need to distribute copies of an Access 2007 db and would like to know if I
>can set the following in code:
>
>
>·         Add the user's FE and BE paths to the Trust Center's "Trusted
>Locations"; I tried adding it manually from my machine, but when I emailed
>it to the user, they were wiped out (maybe because those paths don't exist
>from my machine), so I had to go to each user's machine and add the paths.
>  
>
This gets complicated real fast unless you are familiar with OCT and 
.adm files
which I am not. You can configure trusted locations and trusted 
publishers settings
by using the Office Customization Tool (OCT) and the Group Policy Object 
Editor.
This is dependant on network lockdowns. There are also workarounds with 
code certificates
and registry modifications. By the way Thwate is now offering a 3 year 
VBA code
certificate, they used to be only good for a year, which guaranteed 
yearly contact with client.

However if your clients haven't done this, there are default trusted 
locations
You could  perhaps install to.  I haven't ventured there yet.

Several trusted locations are automatically created when you install the 
2007
Microsoft Office system. The following are some examples:

drive\Program Files\Microsoft Office\Templates
drive\Program Files\Microsoft Office\Office12\Startup

>·         Hide the navigation pane (even though I check it not to show, the
>minimized bar is still there and users can still click on it to expand it)
>  
>
 here are some methods of the DoCmd object that you might find useful in 
manipulating the nav pane through code:

SetDisplayedCategories

http://msdn2.microsoft.com/en-us/library/bb242883.aspx

NavigateTo

http://msdn2.microsoft.com/en-us/library/bb238943.aspx

LockNavigationPane

http://msdn2.microsoft.com/en-us/library/bb242880.aspx
DoCmd.LockNavigationPane(True)

DoCmd.SetDisplayedCategories(Show, Category)
Parameters

Name Required/Optional Data Type Description
Show Required Variant Set to Yes to show the category or categories.
                           Set to No to hide them.
Category Optional Variant The name of the category you want to show
                    or hide. Leave blank to show or hide all categories.

You might be able to use code that looks like this but have only seen used
in Word

Dim WithEvents objPane As NavigationPane
http://msdn2.microsoft.com/en-us/library/bb206758.aspx
Private Sub Application_Startup()
    ' Get the NavigationPane object for the
    ' currently displayed Explorer object.
    Set objPane = Application.ActiveExplorer.NavigationPane
End Sub

>·         Hide all tabs (home, create, external data, db tools)  and disable
>shortcut menus - I checked the box to hide full menus and shortcut menus,
>but they still show up
>  
>
You will have to do through ribbons as Martin stated


>
>
>Thank you for any help!
>
>Gale
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada




More information about the AccessD mailing list