Works: How to Query on Text in a Database (81050)



The information in this article applies to:

  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a
  • Microsoft Works for Windows 95, version 4.0 4.5
  • Microsoft Works for Windows 95, version 4.0 4.5a
  • Microsoft Works 2.0
  • Microsoft Works 2.0a
  • Microsoft Works 3.0
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Money 2000 Business and Personal

This article was previously published under Q81050

SUMMARY

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

MORE INFORMATION

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 "Betty's" 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, "is equal to" or "contains."
  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 "Betty's" 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 ("). For example, if you wanted to find all of the "Sam's" in the Accounts Database located in your MSWORKS directory, you could:

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

    ="Sam"

  4. 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 "Microsoft Works for Windows User's Guide" for querying on text in the database are incorrect.

The examples should read:

   Using Equals            Text only
   ------------            ---------
   ="Test ?"        OR     Test ?
   ="Apple*"        OR     Apple*
   ="*123 St*"      OR     *123 St*
				

REFERENCES

For more information about how to perform these tasks in Works, see your Works printed documentation or online Help.

Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbhowto KB81050