OL97: Doesn't Contain in Find May Give Unexpected Results

Last reviewed: January 19, 1998
Article ID: Q172675
The information in this article applies to:
  • Microsoft Outlook 97

SYMPTOMS

In Microsoft Outlook 97, when you use the Advanced Find to look for Contacts and specify different values for the name field using the doesn't contain condition, the search results include those values.

RESOLUTION

To get the desired results, use one of the following methods.

Method 1

Set the search criteria using the following example:

  1. On the Tools menu, click Find Items and click the Advanced tab.

  2. Click Field, point to All Mail fields, and click From.

  3. Under Condition, click doesn't contain, from the list.

  4. In the Value box type John (space) Jane, then click Add to List.

  5. Click Find Now.

With this search criteria, Outlook assumes an "AND" function between the names, finding contacts that don't contain John AND that don't contain Jane.

Method 2

Assign a category to each Contact, then use the category name in the Doesn't Contain field. To assign a category follow these steps:

  1. In Outlook, click the Contacts icon in the Outlook Bar.

  2. On the Contacts menu, click New Contact.

  3. Type the pertinent information for the person, then click Categories

        in the lower left corner of the Contact form.
    

  4. Click to select the desired Category name. To create a new Category,

        in "Item(s) belong to these categories," type your new Category name,
        click Add to list, click OK, then click Save and
        Close.
    

  5. On the Tools menu, click Find Items, and then click the Advanced tab.

  6. Click Field, point to Frequently-used fields, and click

        Categories.
    

  7. Under Condition, click doesn't contain, from the list.

  8. In the Value box, type the Category name, then click Add to List.

  9. Click Find Now.

MORE INFORMATION

Steps to Reproduce Problem

  1. In Outlook, click the Contacts icon on the Outlook Bar.

  2. On the Contacts menu, click New Contact.

  3. In Full Name, type John Smith, then click Save and Close.

  4. On the Contacts menu, click New Contact.

  5. In Full Name, type Jane Smith, then click Save and Close.

  6. On the Tools menu, click Find Items and click the Advanced tab.

  7. Click Field, point to Name fields, and click First Name.

  8. Under Condition, click doesn't contain, from the list.

  9. In the Value box type John, then click Add to List.

  10. Click Field, point to Name fields, and click First Name.

  11. Under Condition, click doesn't contain, from the list.

  12. In the Value box type Jane, then click Add to List.

  13. Click Find Now.

The Outlook search engine evaluates the two search criteria as an "OR" function. All Contacts will contain something other than Jane OR John as the first name, therefore they all appear in the search results.


Additional query words: identical exclude sort boolean
Keywords : GnlCont
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbhowto
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.