PRB: Run-time Error '3043' When Using Books Online or DAO (175755)



The information in this article applies to:

  • Microsoft Office 97 Professional Edition for Windows, when used with:
    • the operating system: Microsoft Windows NT
  • Microsoft Visual Basic Professional Edition for Windows 5.0, when used with:
    • the operating system: Microsoft Windows NT
  • Microsoft Visual Basic Enterprise Edition for Windows 5.0, when used with:
    • the operating system: Microsoft Windows NT

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.

MORE INFORMATION

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

  1. From Control Panel, double-click on the System icon.
  2. Click on the Environment tab.
  3. 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.
  4. Run Books Online. You should get the following message:
    "Run-time error '3043', disk or network error"

Using DAO

  1. Repeat steps 1 to 3 as above.
  2. Start a new Visual Basic Standard EXE project.
  3. Add one of the following references to your project:
    • Microsoft DAO 2.5/3.0 Compatibility Library
    • DAO 2.5/3.5 Compatibility Library
    • DAO 3.0 Object Library
    • DAO 3.5 Object Library
  4. 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...
    					
  5. Run the project. You should get the following message:
    "Run-time error '3043', disk or network error"
To correct this behavior, create a directory (such as Temp) for the TMP variable.

REFERENCES

For more information on the cause of this error message, please see the following article in the Microsoft Knowledge Base:

175756 PRB: Setup Wizard Displaying Message Box With '118' and OK Button


Modification Type:MajorLast Reviewed:12/3/2003
Keywords:kbprb KB175755