Validation of fields in Outlook forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

(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...
 
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] = "")

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
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.

Sue Mosher said:
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] = "")

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



SimonBDA said:
(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...
 
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().
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



SimonBDA said:
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.

Sue Mosher said:
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] = "")

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



SimonBDA said:
(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...
 
Back
Top