Solved

Calculate text from two text boxes into another text box

Posted on 2006-07-22
1
232 Views
Last Modified: 2010-04-17
I have two text boxes that  txtbox1 require the operator to enter a value, this value is the initial RAW weight then Txt BOX2 is the final weight after some gain, on TXTbox3 I want to give me a calculated percent value as the values are input on the TXTBOX1 and TXTBOX2 , but I need to get this gain value without any CLICK bottoms, as soon as the operator input the value on TXTBOX1 or TXTBOX2   I want to see percent values on TXTBOX3
0
Comment
Question by:teogos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
Ravi Singh earned 250 total points
ID: 17160577
Which programming language are you using? After looking at your recently asked question I'll assume your using visual basic for now...

You can handle the Change event for textbox1, textbox2... in the event handling procedure you can update textbox3 with the calculation result depending on whats already in textbox1 and 2... small example to give you an idea:

Private Sub txtBox1_Change()
    If Trim(Me.txtBox1.Text) <> "" And IsNumeric(Me.txtBox1.Text) Then        
         If Trim(Me.txtBox2.Text) <> "" And IsNumeric(Me.txtBox2.Text) Then
            Me.txtBox3.Text = <Your calculation here>
        End If
    End If
End Sub

Private Sub txtBox2_Change()
    If Trim(Me.txtBox2.Text) <> "" And IsNumeric(Me.txtBox2.Text) Then        
         If Trim(Me.txtBox1.Text) <> "" And IsNumeric(Me.txtBox1.Text) Then
            Me.txtBox3.Text = <Your calculation here>
        End If
    End If
End Sub

This should change the value of txtBox3 as and when the values are typed into txtBox1 & 2
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question