We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,374 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Total price Increment

I have a different buttons for each item i have, each buttons has a function of which compute total price of item versus the quantity that have been entered in the textbox qty and summing all the total bill of all items to textbox3 or totalbilltext. but it seems that only value that appearing to the textbox3 is the (qtyprice) not the value of the totalbill+=qtyprice. T_T help.

 Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        a = TextBox1.Text
        b = a * 2
        tb += b
        TextBox3.Text = tb

    End Sub

    Protected Sub Button2_Click(sender As Object, e As System.EventArgs) Handles Button2.Click
        a1 = TextBox2.Text
        b1 = a1 * 4
        tb += b1
        TextBox3.Text = tb
    End Sub
2
Contributors
1
Reply
4 Hours
Discussion Span
5 Months Ago
Last Updated
2
Views
zeroflee09
Newbie Poster
7 posts since Mar 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Then it appears that the value of tb is 0 before you add in the value of b.

JorgeM
Industrious Poster
4,023 posts since Dec 2011
Reputation Points: 297
Solved Threads: 549
Skill Endorsements: 115

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0574 seconds using 2.69MB