PRA: Invalid Characters Added to IN Clause Arguments
Article ID: Q102523
Creation Date: 03-AUG-1993
Revision Date: 19-SEP-1996
The information in this article applies to:
- Microsoft Access version 1.1
When you choose OK in the SQL dialog box, you receive the error message "Syntax error in FROM clause" if the query contains an IN clause.
Microsoft Access version 1.1 incorrectly parses the arguments for the IN clause (SQL) after saving the SQL statement.
If you enter the arguments correctly and then save the query, the query will run without errors. However, you must correct the parsing done by Microsoft Access if you make any changes to the SQL statement.
Microsoft has confirmed this to be a problem in Microsoft Access version 1.1. This problem no longer occurs in Microsoft Access version 2.0.
Steps to Reproduce Problem
- Open the sample database NWIND.MDB.
- Attach the sample dBASE IV file, NEWCUST.DBF, located in your Access program directory.
- Create a new query based on the attached table, drag several fields to the query grid, and then run the query to verify that it works properly.
- Switch to Design view. From the View menu, choose SQL.
After the FROM clause, "FROM NEWCUST", type the following:
IN "<drive:\path>" "dBASE IV;"
where <drive:\path> is the drive and directory in which you installed Microsoft Access.
- Choose OK to close the SQL dialog box, then choose OK again.
- Run the query.
Switch back to Design view. From the View menu, choose SQL. Note that Microsoft Access has changed your IN clause to:
IN 'c:\access'["dBASE IV;"]
If you choose OK, the error message stated above will occur.
You must choose Cancel, or correct the IN clause by removing the square brackets from the external database name.
For more information about the IN clause, search for "IN clause (SQL)" using the Microsoft Access Help menu
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
©1997 Microsoft Corporation. All rights reserved. Legal Notices.
Additional reference words: 1.10
KBCategory: kbusage kberrmsg