Results 1 to 6 of 6

Thread: The F8 key

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Wolverhampton, England
    Posts
    218

    The F8 key

    Does anyone know how i could use the F8 key to act as a cmd button click_event??

    Say i had a text box that searched a database. When i enter values into that textbox i want to be able to press F* to execute what is contained in the cmd button's click event! Any ideas??

    I already know how to execute the click event by pressing enter, but was wondering if it could be done through F8??

    Any ideas??

    Many thx in advance

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    2.     If KeyCode = vbKeyF8 Then
    3.         MsgBox "do u'r stuff"
    4.     End If
    5. End Sub
    -= a peet post =-

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Wolverhampton, England
    Posts
    218
    What if, depending on the f8 key being pressed i wanted to execute the entire contents of the cmd button.....and there is quite a few calls to modules in it?? How could i do this?

    many thx in advance

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    2.     If KeyCode = vbKeyF8 Then
    3.         Call Command1_Click
    4.     End If
    5. End Sub
    -= a peet post =-

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Wolverhampton, England
    Posts
    218
    Many thx Peet, sorry for the stupidity!!

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    don't be sorry

    I know the answer because I once wondered myself
    -= a peet post =-

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