Existence of a control on a form

How can i programmatically know that a control (field from the table) exists on a form? My code will be on the form.

Thanks

How about: Field_enabled(bool) := CurrForm.fieldname.ENABLED; ?

But when u try to write CurrForm.Fieldname it doesnt accept if the Fieldname havent been brought to the form from the table. But i want to write a code if the fieldname does exists on the form, then setup editable or visible or whatever.

Thanks.

Hm, why do you want to code for something that actually does not exist?

If you need a field on the form, add it and set the enabled property=no. Then you can do anything you like.

E.g. ff somebody set enabled=yes : IF CurrForm.fieldname.VISIBLE then CurrForm.fieldname.EDITABLE(false);