ThomMenzies
MIS
I have used the following code in the OnKeyDown event of a txtbox to run a command held on the click event of a button (the outcome of which sets the focus to the txtbox):
If KeyCode = 13 Then cmdLogIn_Click
The code works fine when the button itself is pressed (the txtbox aquires the focus), but the OnKeyDown event does not set focus back to the txtbox. It runs the cmdLogIn_Click code fine, but the focus remains with the button. I have littered txtbox.setfocus all over the place, but nothing seems to work.
Any ideas?
Thom
If KeyCode = 13 Then cmdLogIn_Click
The code works fine when the button itself is pressed (the txtbox aquires the focus), but the OnKeyDown event does not set focus back to the txtbox. It runs the cmdLogIn_Click code fine, but the focus remains with the button. I have littered txtbox.setfocus all over the place, but nothing seems to work.
Any ideas?
Thom