First check for yourform.keypreview = .T.
Second on keypress ask for NkeyCode, is the numbre of key you press. You'll find a list on help file (inkey Function).
An example of keypress:
IF nkeycode = -4 &&f5 key
Thisform.command1.Click()
NODEFAULT
ENDIF
Never ask for F10, it does not work.
>How do I get a keypress to perform a button click on my form.
>
>Many thanks in advance
>
>Robin Clapworthy
>BSS
Dominican Republic, a Paradise in America