Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple One - Restrict Sintax -

Status
Not open for further replies.

Grippen

Technical User
Sep 3, 2001
24
GB
Hi,

I'm having problems with Sintax with using "Restrict"

I get the following script working fine....


Set myItems = oCurrentFolder.Items
Set myRestrictItems = myItems.Restrict ("[Op Title] = 'Fred'")
For Each myItem In myRestrictItems
myItem.Display
Next

But I want to replace 'Fred' with the value of a user defined field called "Customer"(I'm in an Outlook Form).

I've tried all sorts of variations around...

Set oTitle = item.userproperties.find("Customer")
Set myRestrictItems = myItems.Restrict ("[Op Title] = oTitle")

What am I missing???

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top