PC Review


Reply
Thread Tools Rate Thread

Complex Find Filters, example: ((A Or B Or C) And D)

 
 
Jim
Guest
Posts: n/a
 
      8th Dec 2003
Hello,

I know how to implement an OR based find filter 'A Or B':

strFilter = _
"[Business Phone] = """ & strNumber & """ Or " & _
"[Home Phone] = """ & strNumber & """"

and I know how to implement an AND based find filter 'A And B':

strFilter = "[FullName] = """ & strName & """ And " & _
"[BusinessTelephoneNumber] = """ & strNumber & """"

But how do I specify an '((A Or B Or C) And D)' find filter?

I want to select a Contact item that matches any one of several
Contact phone number fields against a value, and that also matches
against a name field.

Conceptually (with the quotes removed for readability), this would be
something like:

strFilter = _
[ [Business Phone] = strNumber Or
[Home Phone] = strNumber Or
[Mobile Phone] = strNumber Or ]
And
[ [FullName] = strName ]

If this is possible, I would appreciate a minimal code snippet that
shows compilable syntax, with quotes/etc.

Am I thinking about this right, using the find filter? Or should I
just write code to search the Contact folder myself, where I have full
control and can get as fancy as I want with selection logic?

If the find filter will support complex searches, I assume that it is
somehow more efficient than coming back to my Add-In for processing
for each Contact item in the folder. Is that correct? Is there real
merit in pursuing a find filter based solution?

Thanks.

Jim
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex criteria in advanced filters Michael.Tarnowski Microsoft Excel Worksheet Functions 2 20th Mar 2009 01:26 PM
Filters that find no records Nick.Korynski@gmail.com Microsoft Access Form Coding 1 10th Jan 2007 03:36 PM
complex dataview filters =?Utf-8?B?bWtpZ2Vy?= Microsoft VB .NET 2 25th Jun 2005 08:41 AM
Running row totals after complex filters CMooney Microsoft Excel Misc 3 7th Aug 2004 03:07 PM
Complex task filters =?Utf-8?B?QmlsbCBD?= Microsoft Outlook Discussion 0 28th Apr 2004 11:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 PM.