Hi Farouk,
Good suggestions from all but I think the thing I would do is to have these controls with
no default ControlSource. Create a control class with a new property. In that property, for each control for that class, put the controlsource that may or may not exist. In the Init of the class, check the existance of the table.field in the custom property. If it exists, set the ControlSource to the property value.
This avoids all the error handling issues.
>Hi VFP users & gurus
>
>I need to be able to disable some data controls such as textboxes to make my application backward compatible. Normally, application will bomb if the field to which the data control is tied to, doesn't exist. Thanks.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05