transfer totals into the correct form to be calculated

after selecting 7 option buttons on an order form layout, when I click on the order command button what type of code should I insert in order to take the option button prices and transfer them into another form called cost to be calculated?
Who is Participating?
kamallConnect With a Mentor Commented:
Say that your option buttons (which I think they are check boxes) are on Form1. They are Check1, Check2, ..., Check7. The user checked some of them and clicked on the order button. The code in the order button (click) is:

Cost = 0
If Check1.Value = 1 Then Cost = Cost + 1000
If Check2.Value = 1 Then Cost = Cost + 500
If Check7.Value = 1 Then Cost = Cost + 10

Note that Cost variable should be a Public variable in a Module (.BAS). The 1000, 500,..., 10 are the cost amount that corresponds to each Check box.

Hope that helps.
If you have any difficulties, comment me.
Of course, ffter the code shown above, use the variable Cost to do your job.
zoogirlAuthor Commented:
Kamall, I understand what you mean but the way the layout is there are 7 frames, within those frames are 5 option boxes (not check boxes) after selecting an option from the frame selections you click the order button and that's where I'm having trouble...I know I would put in the code to show the orderform but I have no clue what to do about getting the prices transfered to there appropreate place.  I have a module designed for description and cost for each option but now I'm stuck and everytime I go to do something else errors appear all over the place...if you could help me further withj this it would be great...thanx for your help so far
zoogirl, I would be happy to help you further.
First of all, why do you have option boxes in your frames?
If a frame has one option box and the user clicks it, it will be checked and could never be uncheked by clicking it again. You can only uncheck it by code, which will complicate your job.
Why don't you use check boxes instead?
If you need more help, please explain the problem exactly.
I can build and send you a sample project if you can explain the problem precisely. Just comment me your e-mail.
Best regards.
All Courses

From novice to tech pro — start learning today.