Hello all-
I'm running into a problem with some existing code here where upon opening a form, certain combo boxes, etc are set to not visible or visible based upon the data populated into the form. The objects with the visibility being set are not always included in the form based on the data as well. Thus, the program blows up trying to set visibility on objects that are not there at times. I realize this is moronic coding, but it is existing code and the form is extremely complicated so I'd like to intrude as little as possible. The easiest solution I can imagine is checking if the form element exists before setting the visibility property. Of course, checking if it exists causes it to blow up if it doesn't. Is there a function that can safely check if the form object exists (combo box, text box, label, etc)???
I'm running into a problem with some existing code here where upon opening a form, certain combo boxes, etc are set to not visible or visible based upon the data populated into the form. The objects with the visibility being set are not always included in the form based on the data as well. Thus, the program blows up trying to set visibility on objects that are not there at times. I realize this is moronic coding, but it is existing code and the form is extremely complicated so I'd like to intrude as little as possible. The easiest solution I can imagine is checking if the form element exists before setting the visibility property. Of course, checking if it exists causes it to blow up if it doesn't. Is there a function that can safely check if the form object exists (combo box, text box, label, etc)???