Results 1 to 22 of 22

Thread: [RESOLVED] [2005] math on multiple textboxes show in another

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Location
    So. California
    Posts
    26

    Resolved [RESOLVED] [2005] math on multiple textboxes show in another

    Hi Everyone, I will state the obvious first, I am new here, and new to programming. I have been in construction for years, I had an idea and I am trying to do some things in VB, I have done OK so far. However I am stuck with some math items.

    ON My DB and form I have as many as 7 textbox fields I want to do math on and have the answer appear in another textbox at the bottom of my form.

    Raw math lools like this:

    textbox5 - (textbox1 + textbox2) - textbox6 I want the answer to show in textbox20

    this is similar but:
    textbox5 - (textbox1 + textbox2) - textbox6 / textbox8 I want the answer to show in textbox21

    _______________________________________________________
    I started a new project to test with just 3 boxes just to try and get it to show the answer This was the first step in baby steps - and started with this

    Dim A As Double = TextBox1.Text
    Dim B As Double = TextBox2.Text
    Dim C As Double

    Int(A = Convert.ToInt32(TextBox1.Text))
    Int(B = Convert.ToInt32(TextBox2.Text))
    Int(C = Convert.ToInt32(TextBox2.Text))
    Int(C = A + B)
    TextBox3.Text = Convert.ToInt32(C)


    But it just returns a zero? I am sure I have the whole thing wrong.
    Last edited by Hack; May 11th, 2006 at 06:35 AM. Reason: Added Version

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width