>I have this in MyForm.LOAD, but it gives an error regarding that it cannot be used outside a form.
>
>
>ON KEY LABEL ESC THISFORM.CloseFormESC()
>
Sure, just because thisform didn't exists when that form has no focus.
Just Set Form KeyPreview=.t. and in KeyPress event of that form put:
LPARAMETERS nKeyCode, nShift
DO CASE
CASE nKeyCode = K_27
thisform.CloseFormESC()
ENDCASE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.