After the module of a form is removed or deleted, the code is lost. To continue to work with this form, you must rewrite the code. To do this, set the
HasModule property of the form to
No, and then save the form. After you have saved the form, re-create the module of the form by either setting the
HasModule property to
Yes or by using one of the standard methods to open the module of the form.
To set the HasModule property
- Open the form in Design view.
- If the property sheet is not displayed, click Properties on the View menu.
- In the property sheet, click the Other tab.
- Set the HasModule property to No.
- Close and save the form.
- Reopen the form and reset the HasModule property to Yes.