(also see "Christmas cards tracking" from 12/09/2005)
Using Outlook 2003, I can't find help on how to validate fields in forms by
using the functions/formulae provided such as "InStr( start , string1 ,
string2 , compare ) ", "Choose( index , expr )", "Switch( expr1 , expr1 ,
expr2 , expr2 )" etc.
For example, I want to validate whether a field contains any one of these
values: s, r, sr, rs or blank. How do I do this please?
Answer eagerly awaited..yours in hope...
Sue Mosher [MVP-Outlook] - 12 Dec 2005 19:12 GMT
A validation formula must return True if the data is "good" and False if the data is not appropriate. You could use Instr() to return True or False like this:
Instr([Field Name], "r") > 0
Combine multiple Boolean expressions with OR:
(Instr([Field Name], "r") > 0) OR (Instr([Field Name], "s") > 0) OR ([Field Name] = "")

Signature
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
> (also see "Christmas cards tracking" from 12/09/2005)
>
[quoted text clipped - 6 lines]
>
> Answer eagerly awaited..yours in hope...
SimonBDA - 12 Dec 2005 22:00 GMT
This looks fine, but WHERE is the help for it - are you born with this
knowledge?!
Where can I find the syntax of Instr and the other functions?
Many thanks for swift response.
> A validation formula must return True if the data is "good" and False if the data is not appropriate. You could use Instr() to return True or False like this:
>
[quoted text clipped - 14 lines]
> >
> > Answer eagerly awaited..yours in hope...
Sue Mosher [MVP-Outlook] - 14 Dec 2005 16:12 GMT
For help on Outlook forms issues, press Alt+F11 to bring up the Outlook VBA environment. Choose Help | Microsoft Visual Basic Help. There's an entire Help "book" on Outlook - Forms. The validation topics are under Working with Forms / Working with Fields and Controls / Using Field Validation.
You can also search help for standard VB/VBScript methods like Instr().

Signature
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
> This looks fine, but WHERE is the help for it - are you born with this
> knowledge?!
[quoted text clipped - 19 lines]
>> >
>> > Answer eagerly awaited..yours in hope...