>I have a procedure that is used in most forms that I have in my TblClass.vcx. I drag and drop TblClass onto the form then use the procedures in there. I just had the thought that it would be easier to just add a Method to my form base class for IsEmpty(). That way it is always there when I need it. Is there any reason not to have several procedures added to your form class to handle routine things?
>
>Basicly IsEmpty() just checks the control.value to see if it is empty(). if it is empty it puts up a messagebox and returns the focus to that control. I use it in my cmdSave control...
>
If it's a common method for all your Forms, it makes sense to add it as a custom method to your base form class; you don't have to use it if you don't want to, but it's there and accessible. This now lets you delegate responsibility to the form for the method; anything that needs it like your cmdSave can reference the Form property, as could any other control or method of the form that might need it. If some sort of specialized behavior unique to a Form modifies the behavior, you can add instance code to the method and access it in the same way as other references to the method are made - the controls that rely on it don't need to be aware of the change.