Microsoft KB Archive/81050

= Works: How to Query on Text in a Database =

Article ID: 81050

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 4.0a
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 2.0 Standard Edition
 * Microsoft Works 2.0a
 * Microsoft Works 3.0 Standard Edition
 * Microsoft Works 3.0a
 * Microsoft Works 3.0b
 * Microsoft Money 2000 Business & Personal Edition

-



This article was previously published under Q81050



SUMMARY
This article shows you how to perform text queries in the Microsoft Works database.



Works 4.0, 4.5, and 4.5a for Windows 95
To perform text queries in the Works 4.x database, use a filter. For example, if you want to find all of the &quot;Betty's&quot; in an open database that contains a field called First Name, you can use the following steps:


 * 1) From the Tools menu, click Filters. If other filters exist, click the New Filter button, otherwise provide a name for your new filter and click OK.
 * 2) In the Field Name box, click the First Name field.
 * 3) In the Comparison box, click the appropriate operator, for example, &quot;is equal to&quot; or &quot;contains.&quot;
 * 4) In the Compare To box, type the information you are searching for, in this case, Betty.
 * 5) Click the Apply Filter button to see the results of your query.

Works for Windows version 3.0
To perform text queries in the Microsoft Works for Windows Database version 3.0, use the Query generator dialog. For example, if you wanted to find all of the &quot;Betty's&quot; in the Winglist Database located in your Samples sub-directory you could:


 * 1) From File menu, click Open existing file.
 * 2) From the Msworks\samples directory, open the winglist.wdb file.
 * 3) From the Tools menu, click Create New Query.
 * 4) In the Fields To Compare box click the field you want to query (that is, the First Name field).
 * 5) In the How To Compare box, click the operator to use in the query (that is, Equals To).
 * 6) In the Value To Compare Field To box type the information you are searching for. i.e. Betty.
 * 7) Click the Query Now button or switch to the List view by choosing List from the View menu to see the results of your query.

NOTE: To view the actual query formula click Query View.

Works for Windows version 2.x
To perform text queries in the Microsoft Works for Windows Database version 2.x, you must either type only the query text OR begin the query with an equal sign (=) AND surround the text with quotation marks (&quot;). For example, if you wanted to find all of the &quot;Sam's&quot; in the Accounts Database located in your MSWORKS directory, you could:

 From the File menu choose Open Existing File. Open the ACCOUTNS.WDB file. From the View menu, click Query. In the First Name field, type the following:

=&quot;Sam&quot;

 Switch to the List view either by clicking the List button from the Toolbar or from the View menu, choose List to see the results of your query.

The examples listed on page 282 of the &quot;Microsoft Works for Windows User's Guide&quot; for querying on text in the database are incorrect.

The examples should read:

  Using Equals            Text only -  =&quot;Test ?&quot;        OR     Test ? =&quot;Apple*&quot;       OR     Apple* =&quot;*123 St*&quot;     OR     *123 St*

