Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Math Calculations Need Help with

Status
Not open for further replies.

GrnEyz

MIS
Aug 30, 1999
2
US
I am student who is programming a program where I have 2 optioption buttons and a check box. I need to calculate the total...If option 1 is chosen the registration fee is $100 if option 2 the fee is $120. If they choose the Check box they get 10% off.<br>
<br>
Thank You <br>
Billie-Jo
 
what you need to know is if the check box is checked or not.<br>
If the box is checked, its value is 1 else it is zero. THe option button should have a frame around it to prevent two choices. Hope this helps.<br>
<br>
Walter Wojciechowski
 
Hi GrnEyz!<br>
<br>
If it's just the math you need help with, then try this:<br>
<br>
if option1 then<br>
total = 100<br>
else if option2 then<br>
total = 120<br>
end if<br>
if check1 = vbChecked then<br>
total = total * 0.90<br>
end if<br>
<br>
<br>
Like wallyw said, you should put all option buttons that are related in their own frame. Make sure the frame actually "owns" the option buttons by doing a "cut" on the option button, selecting the frame, then doing a "paste", which will insert the option button into the frame. Repeat for the other option button. What this does is tell Windows that these option buttons should be grouped together, so that once a user uses the tab key to get to one of them, they can use the arrow key to select different ones.<br>
<br>
Chip H.<br>

 
Thank you both for your prompt attention to solve my problem.<br>
My program is running great now!! I jsut couldn't get the math right for some reason..oh well.<br>
Thanks again,<br>
Billie-Jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top