MSQuery ErrMsg: "Cannot Access Table..." If No Defined Database

ID: Q115317


The information in this article applies to:


SYMPTOMS

In Microsoft Query version 1.0, if you use the Microsoft Excel ODBC driver to access a worksheet that does not have a defined database, you will receive the following error message:

Cannot Access Table c:\xldata.xls
where c:\xldata.xls is the name of the Microsoft Excel table being added.

You will receive the same error message if you try to view the table through the Table Definition option under the File Menu.


RESOLUTION

To avoid the error message, do the following to define a database range in Microsoft Excel:

  1. Open the file in Microsoft Excel 5.0.


  2. Select the field headings and all rows you want to be included in the database.


  3. From the Insert menu, choose Name, and then choose Define.


  4. Type in the name "MyDatabase" (without the quotation marks), and then choose OK.


  5. Resave and close the file (the worksheet must be saved in its original format, do not update the format to Microsoft Excel 5.0).



MORE INFORMATION

You can use the ODBC Microsoft Excel files driver to open and query Microsoft Excel version 3.0 and version 4.0 files. For more information on how Microsoft Query uses ODBC, query on the following words in the Microsoft Knowledge Base:


   Query ODBC Connectivity 


The ODBC Driver for Microsoft Excel files did not ship with Microsoft Excel version 5.0 and Microsoft Query version 1.0.

To obtain ODBC Driver for Microsoft Excel, call the Microsoft Order Desk at (800) 360-7561 and request the ODBC Driver for Microsoft Excel. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, see the Microsoft World Wide Offices Web site at:
http://www.microsoft.com/worldwide/default.htm

Additional query words: 1.00 err msg \* \* W_excel


Keywords          : xlquery 
Version           : 1.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: July 15, 1999