By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

Keystroke 13

OuTCasT
100+
P: 374
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
Apr 21 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
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.
Apr 21 '08 #2

OuTCasT
100+
P: 374
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

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtearnings1_keypress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtEarnings1.KeyPress
  2. If e.KeyChar = ControlChars.Cr The  
  3. lblEarningsTotal.Text = format(val(txtEarnings1.Text + txtEarnings2.text), "0.00")
  4.             txtEarnings2.Focus()
  5.         End If
  6.     End Sub
Apr 21 '08 #3

debasisdas
Expert 5K+
P: 8,127
That should work for you .
Apr 21 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.