Microsoft KB Archive/175755

= PRB: Run-time Error '3043' When Using Books Online or DAO =

Article ID: 175755

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Office 97 Professional Edition, when used with:
 * Microsoft Windows NT 4.0
 * Microsoft Visual Basic 5.0 Professional Edition, when used with:
 * Microsoft Windows NT 4.0
 * Microsoft Visual Basic 5.0 Enterprise Edition, when used with:
 * Microsoft Windows NT 4.0

-



This article was previously published under Q175755



SYMPTOMS
"Run-time error '3043', disk or network error" message.



CAUSE
The above error is generated when you do not have a valid directory (usually the Temp directory) pointed to by the Environment User Variable TMP under Windows NT 4.0. This problem should not occur on Windows 95, Windows 98, Windows 2000, or Windows Me because those operating systems automatically setup a TMP environment variable and respective Temp directory.



RESOLUTION
Create a valid (Temp) directory for the TMP Environment User Variable. From Control Panel, double-click the System icon. Select the Environment tab. Under "User Variables for [UserName]," change the value of TMP to an existing directory name.



Steps to Reproduce the Behavior:
There are two ways to reproduce this behavior under Windows NT 4.0 (both server and workstation).

Using Books Online
 From Control Panel, double-click on the System icon. Click on the Environment tab. Under "User Variables for [Username]," change the value of TMP to a non-existing directory name, or delete or rename the existing directory pointed to by the TMP variable. Run Books Online. You should get the following message:

"Run-time error '3043', disk or network error"



Using DAO
 Repeat steps 1 to 3 as above.</li> Start a new Visual Basic Standard EXE project.</li> Add one of the following references to your project: <ul> Microsoft DAO 2.5/3.0 Compatibility Library</li> DAO 2.5/3.5 Compatibility Library</li> DAO 3.0 Object Library</li> DAO 3.5 Object Library</li></ul> </li>  Add the follow code to the Load event procedure in Form1: Dim WS as WorkSpace Dim sPath as String sPath = DBEngine.IniPath         ' This is fine Set WS = DBEngine.Workspaces(0)  ' Error at this point... </li> Run the project. You should get the following message:

"Run-time error '3043', disk or network error"

</li></ol>

To correct this behavior, create a directory (such as Temp) for the TMP variable.

<div class="references_section">