Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 10th, 2004, 04:39 PM
Registered User
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default objRS.Filter (Multiple Field Filters)

I am using the following code to filter on a single field, which works fine.

For intType = 1 To intNumberofRecords
 strCriteria = "Type LIKE '" & strType & "*'"
 objRS.Filter = strCriteria
Next

However, if I want to filter first on one field, and then filter the results on another field criteria, can someone provide the coding to do this?
 
Old March 10th, 2004, 04:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If I understand you correctly, you can just use AND and OR in your filter:

strCriteria = "Type LIKE '" & strType & "*' AND SomethingElse > 10"
objRS.Filter = strCriteria

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter results by value in a gridview field cesemj ASP.NET 2.0 Basics 2 February 20th, 2008 11:39 PM
multiple field filter url help ddnk77872 PHP Databases 1 January 22nd, 2007 12:05 AM
table field filter jpenn Reporting Services 1 July 11th, 2006 10:24 AM
Statement for Multiple Filters in SQL mckly Pro VB Databases 1 August 2nd, 2004 01:53 PM
Filter Report by a formulate field Tere Crystal Reports 0 December 1st, 2003 07:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.