Option Buttons

G

Guest

Hi,

I'm looking for some help with option buttons. I have a bound control
"SellPrice". I have three bound controls "SellMultiplier1";
"SellMultiplier2" and "SellMultiplier3". I have three text boxes that each
multiply the sell multiplier by the total of subform on this main form. I
have a radio button beside each of these text boxes. When selected, the
amount in the text box next to it fills in the "SellPrice".

What I need to know is how to either group these into an option group and
still keep the "OnClick" code that populates the "SellPrice" field or code
that will make the green disappear from the other two buttons when one is
selected.
I hope this is clear.

Any help is, as always, greatly appreciated!
Pam
 
J

Jeff L

In an option group, you can only have one option selected, so keep that
in mind before you try to change it. If you are ok with that, then
fine. When you create an option group, each option is assigned a
value, usually 1,2,3,etc but you can set the values to whatever you
wish. Now in the code behind the option group, you are probably going
to want to use the After Update Event. In the code you will have
somthing like this:

Select Case MyOptionGroupName
Case 1
Me.TextboxName = SellMultiplier1 * Total
Case 2
Me.TextboxName = SellMultiplier2 * Total
Case 3
Me.TextboxName = SellMultiplier3 * Total
End Select

Hope that helps!
 

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