Thread: Restriction
View Single Post
  #1  
Old May 24th 07, 09:16 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Restriction

If you coded the restrict string separately, I suspect you'd see the problem in an instant:

strFind = "[Manager's Name]='Bill Smith'" & "[Company]='ABC Metal'"
MsgBox strFind

Multiple search expressions need to be joined with the usual operators " AND " or " OR ".

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Joel Allen" wrote in message ...
Hello,

I am using a restriction in my Task form code like this:

oOVCControl.Restriction = "[Manager's Name]='Bill Smith'"

Is it possible to set 2 parameters to the restriction like this?:

oOVCControl.Restriction = "[Manager's Name]='Bill Smith'" & "[Company]='ABC
Metal'"

Thanks,
Joel


Ads