• 0

Visual Basic 6 Help!


Question

Hey, im doing computing at A level in England. For my homework we have to create a program that will produce an invoice for a company and to send to customer. note that this is not a real company, its is just a situation given to us. I have been able to do what is in the picture so far but was wondering if anyone could tell me how to get ll the different totals for each chocolate's to add automtical in the 'total' box. i have the other total's for each choclate done so that they add up automatical but i am unsure how to do the 'total' for all. cheers

post-253379-1254595739_thumb.jpg

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Can't you just add the contents of all the individual total text boxes, and output that in the total textbox?

This book is great for A-level VB6 project too. ?2.76 if you buy it used.

Edited by acnpt
Link to comment
Share on other sites

  • 0

i know this may be a little bit annoying for you guy''s but ive only done 2 lessons on programming so you will need to explain more. sorry lol

Link to comment
Share on other sites

  • 0

For anything you want to add up, create multiple controls so they are in an array by using the same name. Then on txtControlAr_KeyUp you could have it automatically calculate the totals.

Link to comment
Share on other sites

  • 0
they still teach vb6?

That's what I was thinking. Isn't that like 14 years old at least? VB back then was such a joke.

Link to comment
Share on other sites

  • 0
i know this may be a little bit annoying for you guy''s but ive only done 2 lessons on programming so you will need to explain more. sorry lol

Along the lines of

txtBoxTotal.text = cint(txtboxtotal1.text) + Cint(txtboxtotal2.text) + Cint(txtboxtotal3.text)
Link to comment
Share on other sites

  • 0
they still teach vb6?

Yep, its still around on the school/college computing A-level. Its not really a computing science course.

When you get to university, its Java Java Java, and a bit of everything else.

Link to comment
Share on other sites

  • 0
Yep, its still around on the school/college computing A-level. Its not really a computing science course.

When you get to university, its Java Java Java, and a bit of everything else.

Yeah that ****ed me off, Java's just not worth the amount of time they have you put in it.

Link to comment
Share on other sites

  • 0
For anything you want to add up, create multiple controls so they are in an array by using the same name. Then on txtControlAr_KeyUp you could have it automatically calculate the totals.

thanks but like i said before i know next to nothing, can u expalin how to do this please :) soz

Link to comment
Share on other sites

  • 0
wow you did that ALL in If and Then statements?

like i said i have done 2 lessons and got taught the very basic's, which is why im asking for your help. i got taught like that, i dont even know what statements is

Link to comment
Share on other sites

  • 0
like i said i have done 2 lessons and got taught the very basic's, which is why im asking for your help. i got taught like that, i dont even know what statements is

Your teacher must be as bad as mine was. Buy that book I linked to!

That textbox seems like it doesn't exist, also your adding the same one three times?

Link to comment
Share on other sites

  • 0
Your teacher must be as bad as mine was. Buy that book I linked to!

That textbox seems like it doesn't exist, also your adding the same one three times?

yes she is. she didnt know what 8 x 11 was and we had to tell her it was 88 and she thought it was 130. she must of got her teaching degree in a cereal box lol

i just want it so that all the totals from the different chocolate adds up into the main total box automatically. i just copyed and pasted what people had said. i hant got a clue what im doing im just guessing and just hoping one works =/

il delete it all, can some1 direct me from the start of how to do this. i couldnt imagin it is hard but for me who and hardly any lessons it is hard. cut me some slack guys lol

Link to comment
Share on other sites

  • 0

wow... this is just epic.

You need to purchase a book and look at how you are writing your code against how it should be done. Would appear your teacher doesn't know the first thing about programming principles if she is letting you write code like that.

Link to comment
Share on other sites

  • 0

My course was exactly the same at College. Wasn't taught anything about Statements etc until University!

I don't think it matters what programming language they teach at that stage, its more learning basic principles of programming, whether it be in VB6 or later.

However, by the looks of things, your teacher is failing to do that.

There are loads of tutorials on the internet for VB6, and it would be a good idea to purchase the book that was suggested.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.