Thread: Form summary

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0

    Form summary


    I am new to this and would appreciate help.

    I have a form with few textBox fields and need to show summary of these in another field.

    I thought it should be as easy as

    TextForm3.Text = TextForm1.Text + TextForm2.Text

    but obviously it works as string not as an integer.

    Any help appreciated

    Thanks

    Miro
    Last edited by miro_72; November 17th, 2003 at 04:10 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    11
    I am not sure what you really want to do. Just take all what from one and add it to another ?

    you better use textform1.text & trextform2.text when working with screens and text or form box.

    or if it's some numbers that you want to use do something similar to
    textform3.text = int(textform1.text) + int(textform2.texT)

    I hope I understanded your question (not sure) and that I helped you a bit :S
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0
    Thanks Watever,

    What you wrote gave me an idea, but did not quite worked as expected. my code is like this:

    textBox20.Text = int(textBox2.Text) + int(textBox3.Text);

    but I get errors with this
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0
    to explain what i want:

    i want to use two integers entered in two form textBox fields in calculation and display result in third textBox field.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    11
    Wich code are you using to code ? cause that's suppose to work fine

    Code:
       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            TextBox3.Text = ""
            TextBox3.Text = Int(TextBox1.Text) + Int(TextBox2.Text)
        End Sub

IMN logo majestic logo threadwatch logo seochat tools logo