Utilising the keyboard

A

ashg657

Hey people,
Bit of a random one this.........
I was wondering if there is any way to utilise the F Keys on a standard UK
Keyboard especially F2 through to F4 (I know F1 is Access Help). Ideally, the
user would hit the F2 key, which would boot off a procedure which would
display some information in a pop-up box. This would be extremely useful for
my database.

Thanks for any help.
Ash.
 
A

Allen Browne

Create a macro named AutoKeys. (The name is important.)

In the Macro Names column (View menu if you don't see it), enter the
function key in braces, e.g.:
{F2}
Beside that, enter the action you want - typically RunCode to call a
function.

Note that AutoKeys applies application-wide. If you only wanted to do this
in one form, it would be better to set the form's KeyPreview to Yes, and use
the form's KeyDown event to trigger your action (and set KeyCode to zero to
destroy the keystroke.)
 
Top