A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Restriction



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 24th 07, 07:04 PM posted to microsoft.public.outlook.program_vba
Joel Allen
external usenet poster
 
Posts: 117
Default Restriction

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
  #2  
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


 




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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Size Restriction Donnie Darko Outlook Express 9 May 6th 07 05:26 PM
problems with OVC .Restriction in a VB form used in an Outlook dll codemonkey_147 Outlook and VBA 1 February 8th 07 04:52 PM
problems with OVC .Restriction in a VB form used in an Outlook dll codemonkey_147 Outlook and VBA 1 February 7th 07 10:21 PM
problems with OVC .Restriction in a VB form used in an Outlook dll codemonkey_147 Outlook and VBA 0 February 7th 07 06:55 PM
question how to get the outlook advanced find dialog and QueryRestriction restriction roger Add-ins for Outlook 3 November 27th 06 04:03 PM


All times are GMT +1. The time now is 11:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.