Different Setups For Access 97 (Creating Custom profiles)
Currently I use Access V2, but will shortly change to 97. In V2, I have a
number of program manager items for starting Access using different .INI files.
This allows me to load different libraries, have different title bar texts, load
different add-ins etc. to suit the development work in progress.
How is this achieved in 97? I guess some manipulation of the registry is
required, but I'm not sure what at this stage.
Look through MS Access 97's Online Help topic "Create a user profile" (see
below) and do exactly as described in it - I did and I succesfully created
several profiles (installations) of my app. Of course this process can be
automated... And there is no need to follow exactly all the steps described in
P.S. How to create a user profile:
To create a user profile:
- Start the Registry Editor.
- Navigate to the \HKEY_LOCAL_MACHINE\SOFTWARE key.
- Add three nested keys using the following format to ensure uniqueness:
\Your Company\Your Application\Your Application Version Number
- Under the \Your Application Version Number key, re-create any of the keys
located under the \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\Access key
that contain values that you want to modify (except the \Profiles key you will
create in step 7), and then copy the appropriate values under each key.
- Modify the values that you want to change.
- Navigate to the \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\Access
- Add a new key and name it \Profiles.
- Add a string value to the \Profiles key and give it the name that you want
to use on the command-line.
- For the value's data, enter a string that points to the location of the
keys created in step 3: \SOFTWARE\Your Company\Your Application\Your
Application Version Number.
- Create a command-line for your application that specifies the name you
entered in step 8, in double (") quotation marks. For example: MSAccess.exe
/profile "Your Profile" Your Application.mdb
To override any of the Jet 3.5 database engine default settings
- Navigate to the \HKEY_LOCAL_MACHINE\SOFTWARE\Your Company\Your
Application\Your Application Version Number profile key.
- Create a key named \Jet\3.5\Engines.
- For each built-in driver's settings you want to override:
* Add an appropriately named key below the key created in step 2, for example,
to override Jet Paradox settings, add a key named "Paradox."
* Add values of the appropriate name and type to that key, and then specify
You can model your keys and values after the keys and values in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines.
- You can use the acSysCmdProfile argument of the SysCmd function to
determine if your application has properly loaded your user profile (For
example, your users might accidentally open your application through Windows
Explorer and bypass the /profile command-line option). For more information
- You can also use the Data Access Object (DAO) method, DBEngine.SetOption
to dynamically modify Jet registry values at run-time for a single session,
without permanently modifying the values in the Windows Registry. For more
- It's possible to have the same registry key set in three different ways,
but only one value can be used. In a case like this, a user profile setting
takes precedence over a Microsoft Access setting, which in turn takes
precedence over a Microsoft Jet setting. The following table illustrates this
order of precedence using the ODBC ConnectionTimeout setting as an example.
||Registry setting under \HKEY_LOCAL_MACHINE\SOFTWARE…
||\Your Company\Your Application\Your Application Version Number\ODBC\ConnectionTimeout=100
If you start your application using a command-line that specifies the user
profile, then Microsoft Access uses the ConnectionTimeout value of 100. If you
start your application without using the user profile, then Microsoft Access
uses the ConnectionTimeout value of 300.
Copyright © 1999-2008 by Shamil Salakhetdinov. All rights reserved.