You are RIGHT Fabio.
I added a button called cmdRUN to form2 and when I call prg1 from form2.cmdrun.click() the ON ERROR triggers and it's OK.
But, I still need to call prg1 from the form2.fire() method (it is supposed to run without any User Interaction).
So, when I put
thisform.cmdRun.click()
in the thisform.fire() method, I still have the same problem!!
(where ON ERROR does not trigger and instead form2.error() takes priority).
Is there any way I can run prg1 from the form2.fire() method, and have ON ERROR trigger in prg1 ?
Thanks
PS: I looked at TRY..Catch in helpfile as Doug suggested, but since I have never used it, I can't figure out how to substiture a simple
"ON ERROR DO errhand1" with TRY..CATCH equivalent. It seems a lot more complex and would require massive code change. In each section of prg1, there is a different ON ERROR DO errhand1 in effect where errhand1, errhand2, ... do different things. So, I would much rather get the ON ERROR in prg1 working anyway possible.