ACC2: Cannot Search for Name with Apostrophe in Find CustomersLast reviewed: July 16, 1997Article ID: Q121260 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you are using the Find Customers form in the sample database SOLUTION.MDB, you cannot search for a customer whose name contains an apostrophe ('). For example, if you try to search for a customer with the name "B's Foods," you receive the following error message:
Syntax error in query expression '[Company Name] Like 'B's Foods*'' RESOLUTIONThis article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information on Access Basic, please refer to the "Building Applications" manual. The following steps demonstrate how to modify the AddToWhere Sub procedure so that you can search for customer names containing apostrophes. NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
|
Keywords : FmsEvnt kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |