Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Rowfilter to find a range of text values using LIKE

Status
Not open for further replies.

gtrscott

IS-IT--Management
Dec 31, 2003
21
0
0
US
Hi All,

I'm trying to display a range of names from a dataset in a datagrid. Like names starting with A through F.

This vb LIKE syntax works.
Code:
bolTest = "Apple" LIKE "[A-F]*"

But appy the same to the rowfilter and it doesn't work.
Code:
Rowfilter =  "DisplayName LIKE '[A-F]%'"

The following works but it's tedious and probably slow to have all those OR statments.
Code:
RowFilter = "DisplayName LIKE 'A%' OR DisplayName LIKE 'B%'"etc...

Does anyone know a better way?

Thanks in advance

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top