Gerard,
Christof's suggestion was correct. However, if the control is .Null, his code will give you .T. back but your base class code will still bomb. You'll need to check to see if the value is .Null, OR, and simpler, check to see if the the control NAME is type "C"
IF type('thisform.mycontrol') =="O" AND !isnull(thisform.mycontrol)
...
or
IF type('thisform.mycontrol') =="O" AND type('thisform.mycontrol.name') == "C"
...
HTH
Barbara
>I have some code in my Base Class which operates on form controls. Sometimes, for certain forms, these controls wont exist. Is there a way of checking for the existence of a control on a form .i.e.
>
>if ThisForm.Mycontrol exists
> do....
>else
> do ....
>endif
>
>Thsi code would want to be able to check for any control, i.e. Txtbox, Shape, Gris etc.
>
>Regards,
>
>Gerard