>I am bedeviled by by error 1924 "Active control is not an object". The error occurs in the second line of this code:
>
>substitute="thisform.mypf.page"+ltrim(str(thisform.atpage))
>if vartype(&substitute..activecontrol)='O'
> && put code here to ensure the valid for this control fires.
>
>Can anyone tell me what I need to do to keep from generating error 1924 here. I don't know which control if any has focus. The old Foxpro objnum was much more useful to my way of thinking.
Use TYPE() reather than VARTYPE() - VARTYPE() gets upset referencing unknown objects:
IF TYPE(substitute + '.activecontrol') = 'O'
is a tad slower, but doesn't crash and burn when no activecontrol has been assigned.