The information in this article applies to:
SUMMARYThis article demonstrates the two methods you can use to search for specific text in a memo field. The first method uses the Query Designer. The second method programmatically searches a memo field of a database and highlights a specific word or phrase. The program continues searching and highlighting all occurrences within a memo field until all the matches are located. MORE INFORMATIONMethod 1This example uses the CLIENTS database in the SAMPLE\ORGANIZE\DBFS subdirectory interactively using the Query Designer. Open the Query Designer (File, New, Query), and select the drop-down box under fField Name in the Selection Criteria dialog. Scroll to the bottom of the list of fields, and select <EXPRESSION...>. In the Expression window, enter the following: "ATC("msrchstr", Notes)."In the Criteria drop-down box, select "More Than." In the Example textbox, type "0" (zero). When the query is performed, the cursor returns the set of records where the searched-for string occurs in the specified field at any location. Method 2This code example uses the CLIENTS database in the SAMPLE\ORGANIZE\DBFS subdirectory. Before executing the code, open the memo field of the first record and type the following text:"This is a test of memo field text search program. If the test is successful, two occurrences will be found.."After executing the program, type "test" (without the quotation marks) in the @ ... GET field, and press the RETURN key. The program will open the Notes memo field and highlight each occurrence of the word "test." The program will find two instances of the string "test" within the memo field:
Additional query words: highlight search find locate text string
Keywords : kbDatabase kbDesigner kbMAC kbVFp300 kbVFp500 kbVFp600 kbVFP260 |
Last Reviewed: August 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |