ACC: #Error in Linked Spreadsheet After Closing File in Excel (162535)



The information in this article applies to:

  • Microsoft Access for Windows 95 7.0
  • Microsoft Access 97

This article was previously published under Q162535
Novice: Requires knowledge of the user interface on single-user computers.

SYMPTOMS

When you are viewing a linked Microsoft Excel 7.0 or 97 table, you see the following behavior:
   #Error appears in all of the data fields.
				

If you try to edit the table at this point, you receive one of the following error messages.

In Microsoft Access 97
----------------------
The connection for viewing your linked Microsoft Excel worksheet was lost.

In Microsoft Access 7.0
-----------------------
The connection to Excel for viewing your attached worksheet has been lost. Possible cause was that Excel has terminated.

CAUSE

The spreadsheet was closed in Microsoft Excel and Microsoft Access lost its established link to the spreadsheet.

RESOLUTION

To re-establish the link to the Microsoft Excel spreadsheet, close and reopen the linked table in Microsoft Access.

MORE INFORMATION

Steps to Reproduce Behavior


  1. In Microsoft Access, open the sample database Northwind.mdb.
  2. In the Database window, select the Order Details table.
  3. On the File menu, click Save As/Export.
  4. In the Save As box, click "To an External File or Database," and then click OK.
  5. In the "Save Table 'Order Details' In" box, click Microsoft Excel 5-7 or Microsoft Excel 97, and in the Save As Type list, click Export.
  6. On the File menu, point to Get External Data, and then click Link Tables.
  7. In the Link box, click Microsoft Excel in the Files Of Type list, and then select the Order Details spreadsheet you created. Click Link.
  8. In the Link Spreadsheet Wizard, click Next on the screen marked "Your spreadsheet file contains more than one worksheet or range."
  9. On the screen marked "Microsoft Access can use your column headings as field names for your table," click "First Row Contains Column Headings," and then click Next.
  10. On the screen marked "That's all the information the wizard needs to link to your data," except the default for the Linked Table Name. Click Finish. Click OK on the informational message box.
  11. Open Microsoft Excel, and then open the Order Details spreadsheet.
  12. Open the linked table, Order_Details, in Microsoft Access.
  13. Close the spreadsheet in Microsoft Excel.
  14. Switch back to the Order_Details table in Microsoft Access.

    Note that all of the data fields in the linked table, Order Details, contain #Error. If you try to edit the table, you will receive one of the error messages mentioned in the "Symptoms" section.

REFERENCES

For more information about linking to a Microsoft Excel spreadsheet, search the Help Index for "spreadsheets, importing or linking," and then "Import or link data from a spreadsheet" or ask the Microsoft Access 97 Office Assistant.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:kberrmsg kbinterop kbprb KB162535