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?
zoogirlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kamallCommented:
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:

Form2.Show
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.
Regards.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kamallCommented:
Of course, ffter the code shown above, use the variable Cost to do your job.
0
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
0
kamallCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.