Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2004, 04:39 PM
Registered User
Join Date: Feb 2004
Location: Morehead City, NC, USA.
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

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?
Reply With Quote
  #2 (permalink)  
Old March 10th, 2004, 04:48 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

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 Spaanjaars
Everyone is unique, except for me.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 10:03 PM.

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