Restrict method that begin within a certain range of characters

D

donald

Hi there,

i am trying to do what the help said about Restrict.

You can use the Restrict method to search for items that begin within a
certain range of characters. For example, to search for all contacts
with a last name beginning with the letter M, use this filter:

sFilter = "[LastName] > 'LZZZ' And [LastName] < 'N'"

It word find with B to Y or 2 to 9.

so for Y

sFilter = "[LastName] > 'XZZZ' And [LastName] < 'Z"

But what about if i am doing this on A, Z, 1 or 9??

thanks a lot

Donald
 
M

Michael Bauer

Am 14 Dec 2005 09:09:16 -0800 schrieb donald:

Donald, >'A' should find 'B' and <'B' should find 'A'.

Additionally, in OL >= XP you can use the AdvancedSearch functin, which
supports the LIKE operator.
 
D

donald

michael i do know about AdvancedSearch but i have got all the code for
all my programming now.

So let me get this right:

for A i need to do:

sFilter = "[LastName] > 'A' And [LastName] < 'A"

Donald
 
M

Michael Bauer

Am 15 Dec 2005 15:19:12 -0800 schrieb donald:

Donald, that handling is similar to numbers: How could a number be more than
1 and at the same time less than 1?

So, everything less (<) than 'B' must be 'A...'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top