Microsoft KB Archive/78735

= Works: How to Query on an Alphabetical Range =

Article ID: 78735

Article Last Modified on 11/16/2006

-

APPLIES TO


 * 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 Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 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:

>=&quot;{first letter}&quot;&<&quot;{letter after last}&quot;

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

={name}>=&quot;{first letter}&quot;#AND#{name}<&quot;{letter after last}&quot;

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:

>=&quot;b&quot;&<&quot;f&quot;

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

=Field1>=&quot;b&quot;#AND#Field1<&quot;f&quot;

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:

>=&quot;{first letter}&quot;&<&quot;z&quot;|=&quot;z*&quot;

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

=Field1>=&quot;{firstletter}&quot;#AND#Field1<&quot;z&quot;#OR#Field1=&quot;z*&quot;

