Keystroke 13

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    Keystroke 13

    Hi
    Got 2 textboxes and a totals label. i want to be able to add values in the first textbox and when i press enter it should fill the labels value with that value and the focus should be moved to the next textbox, when i add a value into that textbox the labels value must increase with that value aswell.

    can anyone hlp
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by OuTCasT
    Got 2 textboxes and a totals label. i want to be able to add values ... can anyone hlp
    Sure we can help. But with what part of it? We can't write it for you, that's your job.

    Comment

    • OuTCasT
      Contributor
      • Jan 2008
      • 374

      #3
      Originally posted by Killer42
      Sure we can help. But with what part of it? We can't write it for you, that's your job.
      oh ok so then it would be something like this correct

      [CODE=vb]Private Sub txtearnings1_ke ypress(ByVal sender As Object, ByVal e As System.Windows. Forms.KeyPressE ventArgs) Handles txtEarnings1.Ke yPress
      If e.KeyChar = ControlChars.Cr The
      lblEarningsTota l.Text = format(val(txtE arnings1.Text + txtEarnings2.te xt), "0.00")
      txtEarnings2.Fo cus()
      End If
      End Sub[/CODE]

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        That should work for you .

        Comment

        Working...