View Poll Results: How to validate LostFocus event using Click event?
- Voters
- 1. You may not vote on this poll
-
Jul 13th, 2001, 08:53 PM
#1
Thread Starter
New Member
Shortcut Keys!
How can we use the Lost Focus event of the Text box by using the shortcut keys from the command button?
Senario: Cursor is Parked to the TextBox
Case 1. Click the CommandButton, the LostFocus event from the TextBox will be validated. - OK!
Case 2. Press Alt+(Letter) from the CommandButton, the LostFocus event from the TextBox will not be validated. It will move directly to the CommandButton's code. - Not OK!
Case 3. Putting the LostFocus event inside the CommandButton Click event is not applicable. - Dont use this code!
e.g.
Private Sub CommandButton1_Click()
TextBox1_LostFocus
Msgbox "Record Saved!"
End Sub()
Please Help! your answers will be highly appreciated!
Thanks,
Franz
+639198505203
-
Jul 22nd, 2001, 07:22 PM
#2
The LostFocus event happens when the control looses focus. So when click your button the event will fire if you have the focus in the TextBox. Second, if you want to assign a shortcut for that particular textbox, then use KeyUp or KeyDown event in the TextBox and simply set the focus to the command buton.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|