"Syntax Error in FROM Clause" When Getting External Data

This article was previously published under Q171899
This article has been archived. It is offered "as is" and will no longer be updated.
When you use Microsoft Query or Access 97 to return external data to aworksheet in Microsoft Excel or when you view returned data in MicrosoftQuery, you may receive the following error message:

Microsoft Query

Syntax error in FROM clause.

Access 97

This data source contains no visible tables.
This problem occurs if the following conditions are true:
  • You attempt to retrieve data from a Microsoft Access database.

  • The path to the database or the database name itself contains a period (.), for example:
  • You attempt to retrieve data from a Microsoft Excel workbook.

  • The table range in the workbook is called "Database".
To work around this problem, change the path to the database so that itdoes not contain any periods, for example:
C:\MyTest\Northwind.mdb C:\My Test\Northwind.mdb
NOTE: You may use a period before the file name extension (.mdb in thiscase).

Or, rename the table range in the workbook to a name other than"Database".
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
When the file name path contains a period, the path is qualifiedincorrectly by Microsoft Query. As a result, the Structured Query Language(SQL) statement for the data you are retrieving is incorrect, and youreceive the error message in the "Symptoms" section.
XL97 XL7 7.0 msquery get external data create new query XL

Article ID: 171899 - Last Review: 12/04/2015 17:29:34 - Revision: 2.4

Microsoft Excel 97 Standard Edition, Microsoft Excel 95 Standard Edition, Microsoft Access 97 Standard Edition

  • kbnosurvey kbarchive kbbug kberrmsg KB171899