View Full Version : Opening form with a functional key


aqif
10-02-2001, 12:37 AM
Hi http://www.access-programmers.co.uk/ubb/smile.gif

In my form there is a button which open popup form for seeing the avalaible options. I m trying attach a function key to open that form...or any other key for that matter. I m aware or alt+some key...thing....so just want a single function key to be pressed to open a popup form.

Cheers!
Aqif

KDg
10-02-2001, 01:24 AM
Hi aqif,

if you wanted to use F3 for example then set the KeyPreview event of the form to yes and on its KeyDown trap for the particular button that you are after. i believe that these are common to all keyboards, but i might only think that as i work in a corporate environment - ymmv. Just be carefull you don't use a button that's already spoken for http://www.access-programmers.co.uk/ubb/wink.gif

eg.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 114 Then ' F3 on my keyboard
Command0_Click
End If
End Sub


HTH,

Drew

[This message has been edited by KDg (edited 10-02-2001).]

aqif
10-02-2001, 11:55 PM
Thanxx buddy http://www.access-programmers.co.uk/ubb/smile.gif it worked flawlessly.....searched for list of KeyCodes in help but there the list was diffrent like for F3 it was 0x72...can u please mail me the list of other keycodes also http://www.access-programmers.co.uk/ubb/smile.gif

Thnxxxx again...cheers!
Aqif