If your just disabling fields then in the refresh method
private i
i=deleted()
thisform.txtdeleted.visible = i (visible when deleted)
thisform.txtdeleted.visible = NOT i (invisible when deleted)
This eliminates the need for if.. endif
then under the contols put thisform.refresh()
-TomC