Click Event for a bound option button

B

BLUE

Hello All,

I know that I can't perform a click event on a bound option button...But I
can't figure out another way to get the function I want for my form...What I
want my form to do is below:

When a user clicks on the yes option button, I want a textbox to become
visible...But I also want the person that's receiving the form to be able to
see that the yes option button was selected as well as the text the sender
input in the box that became visible.

So if anyone can get me on the right track I would appreciate it...Thank you
in advance

Billy
 
S

Sue Mosher [MVP-Outlook]

Instead of a Click event, you'd use the PropertyChange or
CustomPropertyChange event, depending on which kind of field the buttons in
the option group are bound to. See
http://www.outlookcode.com/d/propsyntax.htm.

You would also need to include code in the Item_Open event handler to set
the text box's UI state when the recipient opens the item.
 
B

Blue

Sue,

I appreciate the response, but I'm just not putting the pieces of the puzzle
together...So today I went out and purchased your book to see if what I was
trying to do was in there as an example...I couldn't find it...So I was
wondering first if I may have over looked it in your book...If I did what
page could it be found on? If not do you have a sample that you can give me
the link to? I guess my biggest problem is how to start the code to make
this happen...Thanks for you help!

Billy
 
S

Sue Mosher [MVP-Outlook]

Sections 18.4.1 and 18.4.2 cover this topic, but you can't start writing the
code until you know whether you have a bound or unbound option button.
That's the critical first step.

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

Blue

Sue,

I read the sections you mentioned and tried some of the examples...I think I
have a more clear understanding of the difference between a propertyChange
and a CustomPropertyChange event...But I still don't understand how the
CustomPropertyChange event will make a textbox appear base on clicking an
option button..And I'm pretty sure that my option buttons are bound because
on the properties dialog under the Value tab I have it connected to a field
(Type:Text, Format:Text, Property to use:Value)...The only reason that I am
doing this is so that when the person that is recieving the form will see
that the sender of the form selected the option button...Do you think this
is the correct approach?
 
S

Sue Mosher [MVP-Outlook]

But I still don't understand how the
CustomPropertyChange event will make a textbox appear base on clicking an
option button..

It won't unless the option button is bound to an Outlook property. If it is
bound, then you run code in the CustomPropertyChange to change the
appearance of the text box. The web page I suggested also shows how to
instantiate an object for a control and change that control's properties.
That information is also in Chapter 18 in the book.
And I'm pretty sure that my option buttons are bound because
on the properties dialog under the Value tab I have it connected to a
field
(Type:Text, Format:Text, Property to use:Value)...

Those are default settings for any text box. Do you see a field selected at
the top of that dialog? If so, what?
The only reason that I am
doing this is so that when the person that is recieving the form will see
that the sender of the form selected the option button...Do you think this
is the correct approach?

That depends on whether the person receiving the message is using Outlook.
Do you know for sure that they are? Also, unless you're in the same Exchange
organization, you probably will not be able to make the form do exactly what
you want, because you won't be able to run code on the recipient end.
 

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