|
-
Jan 17th, 2012, 03:45 PM
#1
Thread Starter
New Member
-
Jan 17th, 2012, 06:13 PM
#2
Re: Help pleaseeeeeeeee
You need the values associated with the checkboxes that the program can use math with. As it is right now, you are attempting to multiply the TEXT property of the Checkbox control.
You cannot multiply String of "Adult" that is within the Checkbox Text property with the value in Numeric Counter up/down control. It is two different types- String and in this case -Short-.
You declared PracticeSessionAdult = 25 and then assign it a value from Text property of Textbox. Why?
Not only will you need to validate that user inserts numbers in the textbox to.
Wgat the basic might look like is this:
txtTotalAdult.Text = ql * PracticeSessionAdult.
Find PracticeSessionAdult by looking at which checkbox selected, and maybe BOTH are selected. Then load your values into the PracticeSessionAdult variable. The multiply by the Numeric/up/down control value.
So basically when the checkbox is ticked -do the operation, and fill it in the textbox.
-
There are a couple ways to do what you want.
You are novice and beginner and I would presume that you were taught the basics to be able to achieve the homework by tomorrow.
You need to search forum here and online to get your answers, one step at a time.
Find out how to convert textbox.text into a integer or short....
Find out how to know when a checkbox has been selected and find out about storing values in the TAg property if using Text property is non usable -like if you have string that cannot be converted into a number, like "2" into 2 or "Adult $25.00" instead of just a label next to checkbox that states Adult, and then you can just use the text property and convert it BEFORE you do any math operations on it.
-
Not only that, but it looks like you are needing some database with this.
I hope you can pull an all-nighter.
Good luck 
-
Maybe someone will have pity on you and help you more.
I was in programming classes too in college [ada and vb] and I knew these projects needed to have full attention and to start asap, because I knew it would be a challenge and looked forward to creating my first programs.
Good luck but don't expect easy way out here.
Do your work!
-
Jan 21st, 2012, 12:34 PM
#3
Thread Starter
New Member
Re: Help pleaseeeeeeeee
proneal, thanks a lot for trying to help me, i took some advice and changed some bits but it's still not working I was sick all week so avoided the class, however i'll have it again this week and will just ask my teacher how to make it work, because i'm really new to VB and i don't understand half of the things you told me to do :/ Thanks anyways !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|