Validation Formula

G

Guest

Hello,

I have custom form where i've changed the 'Job Title' field from a text box
to a combo box. I've binded the 'Job Title' field to my newly created combo
box and entered the values that i would like the drop down list to display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title field.

I'd like to go one step further and make sure that if the user decides to
type something into the 'Job Title' field (instead of choosing from the drop
down list), that what they have entered matches one of the titles i have in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
S

Sue Mosher [MVP-Outlook]

Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.
 
G

Guest

Thanks Sue, that worked great except for one slight problem....

If I were to type an invalid Job Title in the Job Title field and
immediately click on Save & Close (where i don't click off the Job Title
field to get that invalid entry message), it saves my invalid title instead
of prompting me that i have an invalid entry.

Is there any way to get around this?

Sue Mosher said:
Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



smith777 said:
Hello,

I have custom form where i've changed the 'Job Title' field from a text
box
to a combo box. I've binded the 'Job Title' field to my newly created
combo
box and entered the values that i would like the drop down list to
display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title
field.

I'd like to go one step further and make sure that if the user decides to
type something into the 'Job Title' field (instead of choosing from the
drop
down list), that what they have entered matches one of the titles i have
in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
S

Sue Mosher [MVP-Outlook]

Hmmm. I guess I'd never tried that. I'd actually call that a bug. What
version of Outlook and build number?

I think the only way around it would be to write validation code into the
Item_Write event handler to check the value being saved against the values
in the list.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



smith777 said:
Thanks Sue, that worked great except for one slight problem....

If I were to type an invalid Job Title in the Job Title field and
immediately click on Save & Close (where i don't click off the Job Title
field to get that invalid entry message), it saves my invalid title
instead
of prompting me that i have an invalid entry.

Is there any way to get around this?

Sue Mosher said:
Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.

smith777 said:
Hello,

I have custom form where i've changed the 'Job Title' field from a text
box
to a combo box. I've binded the 'Job Title' field to my newly created
combo
box and entered the values that i would like the drop down list to
display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title
field.

I'd like to go one step further and make sure that if the user decides
to
type something into the 'Job Title' field (instead of choosing from the
drop
down list), that what they have entered matches one of the titles i
have
in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
G

Guest

I'm running version 2003 and the build is (11.6359.6360) SP1

Could you point me to any tutorials or help files on doing this through the
Item_write event handler?

Thanks a bunch.

Sue Mosher said:
Hmmm. I guess I'd never tried that. I'd actually call that a bug. What
version of Outlook and build number?

I think the only way around it would be to write validation code into the
Item_Write event handler to check the value being saved against the values
in the list.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



smith777 said:
Thanks Sue, that worked great except for one slight problem....

If I were to type an invalid Job Title in the Job Title field and
immediately click on Save & Close (where i don't click off the Job Title
field to get that invalid entry message), it saves my invalid title
instead
of prompting me that i have an invalid entry.

Is there any way to get around this?

Sue Mosher said:
Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.

Hello,

I have custom form where i've changed the 'Job Title' field from a text
box
to a combo box. I've binded the 'Job Title' field to my newly created
combo
box and entered the values that i would like the drop down list to
display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title
field.

I'd like to go one step further and make sure that if the user decides
to
type something into the 'Job Title' field (instead of choosing from the
drop
down list), that what they have entered matches one of the titles i
have
in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
S

Sue Mosher [MVP-Outlook]

Where do we need to start? Have you ever written any code before? What's the
name of the combo box control? Is it still on the first page of the contact
form?

In the meantime, see http://www.outlookcode.com/d/propsyntax.htm for key
information on referring to Outlook item properties and form controls in
code.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



smith777 said:
I'm running version 2003 and the build is (11.6359.6360) SP1

Could you point me to any tutorials or help files on doing this through
the
Item_write event handler?

Thanks a bunch.

Sue Mosher said:
Hmmm. I guess I'd never tried that. I'd actually call that a bug. What
version of Outlook and build number?

I think the only way around it would be to write validation code into the
Item_Write event handler to check the value being saved against the
values
in the list.

smith777 said:
Thanks Sue, that worked great except for one slight problem....

If I were to type an invalid Job Title in the Job Title field and
immediately click on Save & Close (where i don't click off the Job
Title
field to get that invalid entry message), it saves my invalid title
instead
of prompting me that i have an invalid entry.

Is there any way to get around this?

:

Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.
Hello,

I have custom form where i've changed the 'Job Title' field from a
text
box
to a combo box. I've binded the 'Job Title' field to my newly
created
combo
box and entered the values that i would like the drop down list to
display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title
field.

I'd like to go one step further and make sure that if the user
decides
to
type something into the 'Job Title' field (instead of choosing from
the
drop
down list), that what they have entered matches one of the titles i
have
in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
G

Guest

I am a beginner at writing code. The name of the combo box is JobTitle and it
is still on the first page of the contact form.

Sue Mosher said:
Where do we need to start? Have you ever written any code before? What's the
name of the combo box control? Is it still on the first page of the contact
form?

In the meantime, see http://www.outlookcode.com/d/propsyntax.htm for key
information on referring to Outlook item properties and form controls in
code.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



smith777 said:
I'm running version 2003 and the build is (11.6359.6360) SP1

Could you point me to any tutorials or help files on doing this through
the
Item_write event handler?

Thanks a bunch.

Sue Mosher said:
Hmmm. I guess I'd never tried that. I'd actually call that a bug. What
version of Outlook and build number?

I think the only way around it would be to write validation code into the
Item_Write event handler to check the value being saved against the
values
in the list.

Thanks Sue, that worked great except for one slight problem....

If I were to type an invalid Job Title in the Job Title field and
immediately click on Save & Close (where i don't click off the Job
Title
field to get that invalid entry message), it saves my invalid title
instead
of prompting me that i have an invalid entry.

Is there any way to get around this?

:

Right click the combo box, choose Advanced Properties and set the
MatchRequired property to True.


Hello,

I have custom form where i've changed the 'Job Title' field from a
text
box
to a combo box. I've binded the 'Job Title' field to my newly
created
combo
box and entered the values that i would like the drop down list to
display.

I can create a Forumla that states:
[Job Title] <> ""
which will make sure that the user enters something in the Job title
field.

I'd like to go one step further and make sure that if the user
decides
to
type something into the 'Job Title' field (instead of choosing from
the
drop
down list), that what they have entered matches one of the titles i
have
in
my combo box list. (ie. President, Vice President, Treasurer...)

Is there an easy way to validate this?
 
R

Ron Neville

Smith777,

I’ve run across this problem before with other Microsoft products. You
may want to try changing the focus from the Job Title field to somewhere
else upon saving. I’m not sure what Function name you could use to
trigger it.
 

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