Easy Settings for New Databases

Published 15 June 06 03:06 PM

This is a quick post on a slick new way to make sure that all of your new databases are set up just as you like.  I'm running a little behind on the next regular post as the netcard in the machine I use to build the screenshots expired, so that will be coming after I get my machine patched back together. 

Database Settings

Users often want to have a set of common settings and code for all of their new databases, and this wasn't very easy to do in the past.  In Access 12, all you have to do to create a startup template is to create a new database called blank.accdb and put it under \Program Files\Microsoft Office\Templates\1033\Access.  When you click on "Blank Database" in Getting Started, we'll make a copy of that database and start from there.  That means you can easily load things like:

  • Library code
  • References
  • Database properties
  • Ribbon XML & the loader
  • Default forms & reports
  • Other configuration settings
Filed under: ,

Comments

# aleske said on June 16, 2006 7:13 AM:
Why the template resides in %Program Files%? Standard user (without 'Domain Admin' rights) in domain environment can't change\copy\save files there...

All templates MUST be located only in the subfolder of %UserProfile% or %AllUsersProfile%...
# Francis said on June 16, 2006 10:00 AM:
I agree with aleske. Templates*--from all Office apps--should be stored within the user's profile, in a common location, e.g. "My Templates" under "My Documents." To keep things neat, it might also be helpful to have a subdirectory for each Office application (e.g. "Word Templates," "Excel Templates," etc.)

*This also applies to any user-generated data (e.g. custom dictionaries.)

And please stop Office from hiding templates (setting the hidden file attribute) or requiring templates to be hidden.
# MichMcco said on June 16, 2006 1:43 PM:
We use both currently.  If a user has a blank.accdb in their <Drive>:\Documents and Settings\<User>\Application Data\Microsoft\Templates
directory we will use that as a blank database.

If an administrator has places a blank.accdb file in the program files directory, we will use that one.

In the case where there is both, we defer to the administrator.

I just checked the template files, and they are not hidden.  However the root directory for Application Data is a hidden system folder that Windows controls.
# Francis said on June 17, 2006 9:03 AM:
Interesting. Still, why are the templates are secreted away in a hidden directory? It is nigh impossible for normal users to get at them and a hassle even for "power users."

Perhaps the Office install routine should add a shortcut to AppData\MS\Templates from the My Documents folder?

That would help expose the functionality to users without them needing to tamper with file attributes and traverse a complex directory structure filled with application-critical data.
# Sebastien Caisse said on June 19, 2006 11:15 AM:
Well, windows offers a standard place for templates - which seemingly no one uses - yet everyone has...

%USERPROFILE%\Templates

Look, you'll see that it's there, most probably empty...

The originals are simply slapped into the "Default User" so every user has his own template to build on.

As for priority, if the user decides to override the admin settings, shouldn't the user settings prevail in this case?
New Comments to this post are disabled
Page view tracker