A validation formula must evaluate to True if the data is "good" and False
if the data is not. In your scenario, several conditions must be met:
1) The total length must be 13.
2) The first five characters must be "BUGM-"
3) The right-most eight characters must be numeric.
For #1, use the Len() function.
For #2, use Left().
#3 is the tricky one since Outlook forms don't support IsNumeric() for
validation formulas. Instead you can use Val():
(Len([MyField]) = 13) AND (Left([MyField], 5) = "BUGM-")
AND (Val([Right(MyField, 8)]) > 0)
This assumes that BUGM-00000000 is not a valid value. If so, then you'll
have to add a term to allow for that, since Val() will give you a value of 0
in that case.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"David Lao" <(E-Mail Removed)> wrote in message
news:%23$QBX1B$(E-Mail Removed)...
> Hi,
>
> I tried to create a validation formulas for an input field without a
> success. Here is the input in the field should contain "BUGM-" follow
> with 8 digits number. Example, the valid value is BUGM-00001234 or
> BUGM-12345678.
>
> How can I create a formulas to valid this field ?