ADODB Recordset Filter problem
ADODB Recordset Filter problem
dim rst as ADODB.Recordset
set rst = new ADODB.Recordset
rst.open select field1,field2 from table
..
..
rst.Filter = "(field1 = 100)" it works!
rst.Filter = "(field2 = 2 or field2 = 3)" it also works!
but it doesnt work:
rst.Filter = "(field1 = 100) and (field2 = 2 or field2 = 3)"
//Error: wrong type or conflict between parameters..
WHY?? plz help!!
Re: ADODB Recordset Filter problem
You cannot join an OR group with an AND group. You will have to use something like this:
VB Code:
rst.Filter = (field1 = 100 And field2 = 2) Or (field1 = 100 And field2 = 3)
There may be some quote("" '') issues with my example, you may have to tweak it a little.
Hope this is helpful
JO