Results 1 to 4 of 4

Thread: Addition of two text boxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    12

    Post

    Could you please help, this I know is a simple problem but I can't get the answer to work. I have three text boxes (text1, text2, text3) and a command button. My application is when I press the command button I want text1 to add to text2 and result in text3 using the "+" key. The result I am getting is Text1Text2 beside themselves as if I was using a "&" key.
    Please Help, thanks bjk

  2. #2
    Member
    Join Date
    Jul 1999
    Posts
    40

    Post

    text boxes are text by nature
    you need to perform functions on numbers

    text3.text = Cint(Text1.txt) + Cint(Text2.txt)

  3. #3
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    You might want to do a check to see if the field is numeric before converting it to an int. Text data might turn it into a Type 13 error...

    Using "Val" might also give you the answer you want, IF you don't care to check.

  4. #4
    New Member
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    8

    Post

    ).

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