Help with creating a validation

G

Gladys

In this form I am working on, I have two fields: [Country] (which is a drop
down combo box) and [Other country], a text field which will require input if
the country of choice is not available for the user.

For example, if the user chooses "other" from the drop down list of
[country], they will need to specify the country name in the [other country]
text field. I tried to use the following formula in the validation tab:

([country] <> "other") OR ([other country] <> "")

but I got an "error in validation text formula for 'other country' --
illegal right operand for IN".
What did i do wrong? I hope someone can help me out so I can stop banging my
head against the wall. Thanks
 
S

Sue Mosher [MVP-Outlook]

Do you also have validation text that displays a message to the user? (the 2nd formula box on the Validation tab) I think that's what this message is referring to.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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

Gladys

Thanks. I played around with the message text and realised that if my message
got too long, this error message pops up. Do you know if the message text is
restricted to a certain number of letters?

Also, the formula I've used: ([country] <> "other") OR ([other country] <> "")
didn't work. I tested the form in 'run this form' mode and I chose 'other'
from the[ country] drop down list but the form did not prompt me to enter
something in the [other country] text field. Is there is mistake with this
formula?

Thanks alot!

Sue Mosher said:
Do you also have validation text that displays a message to the user? (the 2nd formula box on the Validation tab) I think that's what this message is referring to.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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


Gladys said:
In this form I am working on, I have two fields: [Country] (which is a drop
down combo box) and [Other country], a text field which will require input if
the country of choice is not available for the user.

For example, if the user chooses "other" from the drop down list of
[country], they will need to specify the country name in the [other country]
text field. I tried to use the following formula in the validation tab:

([country] <> "other") OR ([other country] <> "")

but I got an "error in validation text formula for 'other country' --
illegal right operand for IN".
What did i do wrong? I hope someone can help me out so I can stop banging my
head against the wall. Thanks
 
S

Sue Mosher [MVP-Outlook]

Thanks. I played around with the message text and realised that if my message
got too long, this error message pops up. Do you know if the message text is
restricted to a certain number of letters?

I think you've already answered that question through your own experimentation. Trust your results!
Also, the formula I've used: ([country] <> "other") OR ([other country] <> "")
didn't work. I tested the form in 'run this form' mode and I chose 'other'
from the[ country] drop down list but the form did not prompt me to enter
something in the [other country] text field. Is there is mistake with this
formula?

Outlook will prompt only when you save the item with Country = "other" and Other Country blank.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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


Gladys said:
Thanks. I played around with the message text and realised that if my message
got too long, this error message pops up. Do you know if the message text is
restricted to a certain number of letters?

Also, the formula I've used: ([country] <> "other") OR ([other country] <> "")
didn't work. I tested the form in 'run this form' mode and I chose 'other'
from the[ country] drop down list but the form did not prompt me to enter
something in the [other country] text field. Is there is mistake with this
formula?
 
G

Gladys

One last question: Can I do wrap text in the text fields? It is so irritating
to scroll horizontally. Thanks!


Sue Mosher said:
Thanks. I played around with the message text and realised that if my message
got too long, this error message pops up. Do you know if the message text is
restricted to a certain number of letters?

I think you've already answered that question through your own experimentation. Trust your results!
Also, the formula I've used: ([country] <> "other") OR ([other country] <> "")
didn't work. I tested the form in 'run this form' mode and I chose 'other'
from the[ country] drop down list but the form did not prompt me to enter
something in the [other country] text field. Is there is mistake with this
formula?

Outlook will prompt only when you save the item with Country = "other" and Other Country blank.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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


Gladys said:
Thanks. I played around with the message text and realised that if my message
got too long, this error message pops up. Do you know if the message text is
restricted to a certain number of letters?

Also, the formula I've used: ([country] <> "other") OR ([other country] <> "")
didn't work. I tested the form in 'run this form' mode and I chose 'other'
from the[ country] drop down list but the form did not prompt me to enter
something in the [other country] text field. Is there is mistake with this
formula?
 
S

Sue Mosher [MVP-Outlook]

Look for the Multiline setting on each control's Properties or Advanced Properties dialog.

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

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

Gladys

Thank you very very much! You're my lifesaver!

If i've got a checkbox with yes/no option [Is this a renewal ?]
with a text field beside it [please enter new contract number if it is a
renewal], can I use the following formula to force the user to enter a number
in the text field?

([Is this a renewal ?] <>"yes") OR ([please enter new contract number]<>"")
 
S

Sue Mosher [MVP-Outlook]

Close but not quite. A Yes/No property can have two values -- True or False -- and those are constants, not string literals, so no quote marks around them. See if you can finish the formula, given that info.

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top