Works: How to Query on an Alphabetical Range (78735)



The information in this article applies to:

  • Microsoft Works 2.0
  • Microsoft Works 2.0a
  • Microsoft Works 3.0
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Works 4.5
  • Microsoft Works 4.5a
  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a

This article was previously published under Q78735

SUMMARY

To search on an alphabetical range in the Works for Windows Database, use the following query or filter formula

In Works 2.0:

>="{first letter}"&<"{letter after last}"

In Works 3.0 and Works 4.0, 4.5 and 4.5a for Windows 95:

={name}>="{first letter}"#AND#{name}<"{letter after last}"

where {name} is the field name, {first letter} is the start of the range, and {letter after last} is the letter after the last letter in the range, but is not included in the range. For example

In Works 2.0:

>="b"&<"f"

In Works 3.0 and Works 4.0, 4.5 and 4.5a for Windows 95:

=Field1>="b"#AND#Field1<"f"

includes all records where the field starts with B through E, but doesn't include any starting with F.

In the special case where you would like to have a range including strings starting with Z, use the following form:

In Works 2.0:

>="{first letter}"&<"z"|="z*"

In Works 3.0 and Works 4.0, 4.5 and 4.5a for Windows 95:

=Field1>="{firstletter}"#AND#Field1<"z"#OR#Field1="z*"

REFERENCES

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

Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbinfo KB78735