Results 1 to 3 of 3

Thread: Shortcut Keys!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Philippines
    Posts
    7

    Question 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

  2. #2
    Hyperactive Member Ed Lampman's Avatar
    Join Date
    Mar 2001
    Posts
    273
    You might try using the Validate event instead of LostFocus

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Philippines
    Posts
    7

    Angry Shortcut Keys vs. LostFocus/Validate Event

    Can you give sample codes wherein you will validate the codes from LostFocus event from Textbox if I press the Shortcut key from a CommandButton. I'd try the same way (LostFocus/Validate) but it doesn't give any Validation if I Press the shortcut keys. The only thing that is needed is to Validate or check first the procedure in the TextBox if the cursor is parked there before going to the codes from the CommandButton Click event.

    Pls help. I have a deadline to meet... pls...

    Thanks!
    Formalejo, Francis M.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width