INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Access - Select Dialogs

Error Accessing File. Network Connection May Have Been Lost by remco5897
Posted: 1 Oct 02


The import function in Access 2000 may cause a "Network Connection May have been Lost" error.  This problem is described in the forum from many different angles.

Below is a copy from the Microsoft knowledge base (Q304548) how you can solve this problem:

ACC2000: Error Message: Error Accessing File. Network Connection May Have Been Lost.

The information in this article applies to:
Microsoft Access 2000

Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

When you try to view the code for a module, try to compile a database, try to create an MDE file, or try to execute code in a Microsoft Access 2000 database, you may receive one of the following error messages:

Error accessing file. Network connection may have been lost.
-or-
This action will reset the current code in break mode.

CAUSE

You may receive one of these error messages when both Microsoft Access 2000 and version 6.3.91.8 of the Vbe6.dll file are installed on the computer, and either of the following conditions is true:

You imported forms or reports that contain code modules or standalone modules into a new Microsoft Access 2000 database by using Microsoft Access 2000.

You copied and pasted forms or reports that contain code modules or standalone modules into the Microsoft Access 2000 database by using Microsoft Access 2000.
Then, you closed and reopened the database and try to view, execute, or compile the code.

RESOLUTION

If you have a computer without the version of Vbe6.dll that is mentioned in the "Cause" section, you may be able to repair the problem with the following steps:

1. Open a form or a report in Design view.

2. Save the code behind the form or the report as a text file.

3. Set the form or the HasModule property of the report to No, and then save the object.

4. Repeat step 1 through step 3 for each form and report in the database.

5. Save each module as a text file.

6. Create a new blank database.

7. On the File menu, point to Get External Data, and then click Import. Import all tables, queries, forms, reports, data access pages, and macros to the new database.

8. Restore the code behind each form and each report from the text files that you created in step 1 through step 4.
Import each text file that you saved in step 5 as a new module.

If you do not have a computer without the version of Vbe6.dll mentioned in the "Cause" section, you must revert to a known good backup copy of the database.

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Product Name service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date         Time     Version     Size       File name
---------------------------------------------------------
18-Dec-2001  14:20:12 9.0.0.6013  4,685,878  Msaccess.exe

To prevent this problem from happening again, use one of the following methods, depending on which version of Access you are using.

Using Access 2000

When you import to a new database, create a new database and import the objects into the new database. Or, when you copy objects in the current database, copy and paste the objects into the current database.

Before closing the database, open the Visual Basic Editor by pressing ALT+F11.

On the Debug menu, click Compile database name.
After you compile the database, close and save the database. Note that when you reopen the database and view the code, the error message that is mentioned in the "Symptoms" section of this article does not occur.

Using Access 2002

When you are using Access 2002, use one of the following method based on whether you are importing into a new database or are copying into the current database.
When you are importing to a new database, create a new database using the Access 2000 format, and then import the objects into the new database.

When you are copying objects in the current database, copy and paste the objects into the current database.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Some of the programs that include Vbe6.dll version 6.3.91.8 are Microsoft Office XP, its component applications, and Microsoft Visio 2002. The version number of Vbe6.dll may also appear as 6.03.9180, depending on the version of Windows that you are using.

Steps to Reproduce the Behavior

On a computer that has both Microsoft Access 2000 and version 6.3.91.8 of the Vbe6.dll installed, open Microsoft Access 2000.

In Microsoft Access 2000, create a new blank database and name it ImportTest.mdb.

On the File menu, point to Get External Data, and then click Import.

Browse to the sample database Northwind.mdb for Microsoft Access 2000.

In the Import Objects dialog box, click the Modules tab.
Click the Startup module, and then click OK.
After successfully importing the Startup module, close the ImportTest database.

In Microsoft Access 2000, open the ImportTest database.
Open the Startup module in Design view. Note that you receive one of the error messages that is mentioned in the "Symptoms" section of this article, and you are then unable to view the code for the Startup module.

First Published: Jul 25 2001 12:01PM

Keywords: kberrmsg kbdta kbbug pra errmsg err msg  

Back to Microsoft: Access Modules (VBA Coding) FAQ Index
Back to Microsoft: Access Modules (VBA Coding) Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close