>>Well it works. I created a method in my app called goApp.DoSave() which calls _screen.ActiveForm.save(). Then I just had to add the line:
>>
>>ON KEY LABEL F10 this.DoSave()
>
>Careful there...
>
>VFP let you use THIS in an OKL?
Good catch. Actually I lied. The code was:
ON KEY LABEL F10 goApp.DoSave()
This code is part of the init method of my app, so normally referring to goApp would be invalid since it doesn't exist until Init() finishes suscessfully. In this case it the (only) right thing to do and works fine as long as the user doesn't press the F10 key during instantiation. I suppose I could put this line right at the end of init to reduce that possibility.
I've appended the DoSave method in case anyone is interested.
Peter
***********************************************************************
* METHOD MassOne.DoSave
***********************************************************************
* Parent(base):
* Purpose.....: Execute the Save button on the active form.
* Parameters..:
* Returns.....:
* Created.....: 1999.04.28
* History.....:
**********************************************************************
local llSaveMethod
llSaveMethod = .f.
if type("_Screen.ActiveForm") = "O"
llSaveMethod= pemstatus(_Screen.ActiveForm,"Save",5)
endif
if llSaveMethod
_Screen.ActiveForm.Save()
else
Msg_RS("
.")
endif
return .t.
Peter Robinson ** Rodes Design ** Virginia