The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
This behavior also occurs if you use the FindFirst argument in the AfterUpdate event procedure of a combo box, and you search for a value that contains an apostrophe. For example:
CAUSESearches for text strings that contain quotation marks (") or apostrophes (') require special syntax because both characters are used as delimiters in Visual Basic for Applications. RESOLUTIONWorkaround for Using a Text StringIf you are typing in your search argument, use double quotation marks in your search string to find values that contain single quotation marks and use single quotation marks in your search string to find values that contain quotation marks. For example, to search for a CompanyName that includes an apostrophe, replace the single quotation marks around the CompanyName value with two sets of double quotation marks, as in the following example:
Workaround for Using a Combo BoxIf you are using a combo box to find values that contain quotation marks or apostrophes, add the primary key to the combo box and make it the bound column. Hide the bound column. Then change your criteria so that it searches in the field that corresponds to the bound column in the combo box.For more information about changing the bound column in a combo box, search the Help Index for "BoundColumn property," and then "Bind a column from a list box or combo box." STATUSThis behavior is by design. MORE INFORMATIONThis section assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual. Steps to Reproduce Behavior
REFERENCES
For more information about using the apostrophe in the FindFirst argument,
please see the following article in the Microsoft Knowledge Base:
Keywords : kbcode GnlFnd |
Last Reviewed: April 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |