>
>Jim's solution will easily get you fixed, but I might mention that you ran into this problem because of some shaky design in the first place. If your routine depends on the active form having certain PEMs, then maybe it should have a more solid reference to the form it is calling then _SCREEN.ActiveForm
I used _screen.activeform to make the routine generic. It is in the baseform of my application from which all forms of a certain type inherit. To make the routine more solid I guess the solution is to pass the form to the routine as an object reference -- as someone already suggested. This will keep the routine generic while making the object reference solid.
Anyway thanks to everyone who answered.
Thanks
Gar W. Lipow