"Microsoft Office Access can't change the working directory to '%USERPROFILE%\<path>'" error message when you start Access 2003 or Access 2002 (891124)
The information in this article applies to:
- Microsoft Office Access 2003
- Microsoft Office Professional Edition 2003
- Microsoft Access 2002
- Microsoft Office XP
Important This article contains information about modifying the registry.
Before you modify the registry, make sure to back it up and make sure that you
understand how to restore the registry if a problem occurs. For information
about how to back up, restore, and edit the registry, click the following
article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows Registry SUMMARYAfter you deploy Microsoft Office Access 2003 or Microsoft Access 2002, users in your organization receive an error message every time that they start Access. If those users click OK in the error message box, Access starts successfully.
This issue occurs if you use the %USERPROFILES% environment variable to configure the location where Access stores database files. Access 2003 and Access 2002 cannot successfully resolve this environment variable. Access 2003 and Access 2002 generate standard REG_SZ
registry values when you specify the default database path. Therefore, the %USERPROFILES% environment variable is not successfully resolved to the currently logged on user.
To successfully resolve this environment variable, Access requires the REG_EXPAND_SZ registry type. This article describes how to modify Access 2003 and Access 2002 to use the REG_EXPAND_SZ registry type. This article describes the methods to modify Access in both Microsoft Windows XP and Microsoft Windows 2000. SYMPTOMSWhen you start Microsoft Office Access 2003, or when
you start Microsoft Access 2002, you experience all the following
symptoms:
- You receive one of the following error messages:
Access 2003 Microsoft Office Access can't change the working directory to '%userprofile%\My Documents\FolderName.'
Verify
that the drive is valid and the path is 260 characters or less in
length. Access 2002 Microsoft Access can't change the working directory to '%userprofile%\My Documents\FolderName.'
Verify
that the drive is valid and the path is 260 characters or less in
length. - If you click OK, Access starts
successfully.
- If you click Options on the
Tools menu, and then you click the General tab,
you notice information that is similar to the following in the Default
database folder box:
%userprofile%\My Documents\FolderName You expect the %USERPROFILE% variable to be resolved to the name
of your profile.
CAUSEThis problem occurs if you specify the %USERPROFILE%
environment variable as part of the default database folder path in Access. For
example, this problem occurs if the following conditions are both true:
- You install Access 2003 or Access 2002 by using a transform
file (.mst).
- You set the Default database folder option
in that transform file by specifying a path that contains the %USERPROFILE%
variable. For example, this problem occurs if you type the following path in
the Default database folder box on the Change Office
User Settings page in the Custom Installation Wizard:
%userprofile%\My Documents\databases Note This problem only affects Access 2003 and Access 2002. This
problem does not occur when you specify the %USERPROFILE% variable in a folder
path for other programs such as Microsoft Office Excel 2003. This
problem occurs because Access 2003 and Access 2002 generate standard REG_SZ
registry values when you specify the default database path by using the
Options dialog box in Access or by using a policy. Other Microsoft Office 2003 programs or other Microsoft Office XP programs
generate REG_EXPAND_SZ registry values instead. The REG_EXPAND_SZ registry
value type can resolve environment variables such as %USERPROFILE%.
RESOLUTIONWarning If you use Registry Editor incorrectly, you may cause serious
problems that may require you to reinstall your operating system. Microsoft
cannot guarantee that you can solve problems that result from using Registry
Editor incorrectly. Use Registry Editor at your own
risk. To resolve this problem, modify the Default
Database Directory registry values to use the REG_EXPAND_SZ value type. To do
this, follow the steps for your operating system. Microsoft Windows XP- Click Start, click Run,
type regedit, and then click
OK.
- Locate, and then click the following registry subkey for your version of Access.
Access 2003
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Settings
Access 2002
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Access\Settings - If the Default Database Directory registry
value exists, remove it. To do this, follow these steps:
- In the right pane, right-click Default Database
Directory, and then click Delete. You receive the following message: Are you sure you want to
delete this value?
- In the message box, click
Yes.
- On the Edit menu, point to
New, and then click Expandable String
Value.
- In the New Value #1 box, type
Default Database Directory, and then press
ENTER.
- Right-click Default Database Directory,
and then click Modify.
- In the Value data box, type the path that
you want to use as your default database location. For example, type
%userprofile%\My Documents\databases.
- Click OK.
- Locate, and then click the following registry subkey for your version of Access.
Access 2003
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Access\Settings
Access 2002
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\10.0\Access\Settings - If the Default Database Directory registry
value exists, remove it. To do this, follow these steps:
- In the right pane, right-click Default Database
Directory, and then click Delete. You receive the following message: Are you sure you want to
delete this value?
- In the message box, click
Yes.
- On the Edit menu, point to
New, and then click Expandable String
Value.
- In the New Value #1 box, type
Default Database Directory, and then press
ENTER.
- Right-click Default Database Directory,
and then click Modify.
- In the Value data box, type the path that
you want to use as your default database location. For example, type
%userprofile%\My Documents\databases.
- Click OK.
- Quit Registry Editor.
Microsoft Windows 2000- Click Start, click Run,
type regedt32, and then click
OK.
Note You must use the Regedt32.exe Registry Editor tool to create a
registry value of the type REG_EXPAND_SZ. - Locate, and then click the following registry subkey for your version of Access:
Access 2003
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Access\Settings
Access 2002
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Access\Settings - If the Default Database Directory registry
value exists, remove it. To do this, follow these steps:
- In the right pane, click Default Database
Directory.
- On the Edit menu, click
Delete. You receive the following message: Registry Editor will delete
the currently selected value entry. Do you want to continue the
operation?
- In the message box, click
Yes.
- On the Edit menu, click Add
Value.
- In the Value Name box, type
Default Database Directory.
- In the Data Type list, click
REG_EXPAND_SZ, and then click OK.
- In the String box, type the path that you
want to use as your default database location. For example, type
%userprofile%\My Documents\databases.
- Click OK.
- Locate, and then click the following registry subkey for your version of Access:
Access 2003
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Access\Settings
Access 2002
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\10.0\Access\Settings - If the Default Database Directory registry
value exists, remove it. To do this, follow these steps:
- In the right pane, click Default Database
Directory.
- On the Edit menu, click
Delete. You receive the following message: Registry Editor will delete
the currently selected value entry. Do you want to continue the
operation?
- In the message box, click
Yes.
- On the Edit menu, click Add
Value.
- In the Value Name box, type
Default Database Directory.
- In the Data Type list, click
REG_EXPAND_SZ, and then click OK.
- In the String box, type the path that you
want to use as your default database location. For example, type
%userprofile%\My Documents\databases.
- Click OK.
- Quit Registry Editor.
Modification Type: | Major | Last Reviewed: | 12/20/2004 |
---|
Keywords: | kbDeployment kberrmsg kbtshoot kbprb KB891124 kbAudDeveloper kbAudITPRO |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|