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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there a way to have multiple parameters when using filters on a rec

Status
Not open for further replies.

hoggle

Programmer
Jul 13, 2001
124
US
I need to have multiple parameters while filtering a recordset.
IE:
rs.Filter = "LineNumber=0001 AND (Status='Complete' OR Status='READY')"

basically I need all the items for line 0001 where its Complete or Ready.

I tried the above code and it gives the error.
"Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another"

I used this code and it works but doesn't return the correct results:
rs.Filter = "LineNumber=0001 AND Status='Complete' OR Status='READY'"

any help ?
thanks :D
 
I got it to work by doing:
rs.Filter = "(LineNumber=0001 AND Status='Complete') OR (LineNumber=0001 AND Status='READY')"

not the way I wanted to do it but it works
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top