>Hi,
> I am calling a program (ie. prg file) from the vent handler of a command button on a form. In the prg file, I have a error handler "HandleError". When Iam in HandleError function, I want to return control to the next statement in the button click event instead of the next statement in .prg file.
>
>Is there any way of doing it? I looked at the syntax of "return". It says I can return to any procedure (in the call stack) or master. When I gave
> return to Form1.cmdBtn.Click
>
> I got syntax error.
>If you know, how to do this, please reply to me.
>
>Thanks
Puri,
You will need to pass the commadn butons object reference to the procedure like this;
DO MyProc WITH THIS
Then in the procedure you receive the reference in a private parameter;
PARAMETERS poObj
Now in the error handler code you can;
RETURN TO poObj.Click