Soykan,
>i think your keypress event code will solve my problem and i don't need to use on key label f2 oToolbar.cmdaddnew.click() command at loadevent and for release it on destroy event . isn't it ?
Correct, with the code in the form.KeyPress() and form.KeyPreview = .t. there is no need for ON KEY LABEL commands.