Can't Rename Form in AC 2007

  • Thread starter Thread starter JamesJ
  • Start date Start date
J

JamesJ

I try to rename a form by right clicking and selecting Rename.
After I rename it and hit enter I get the following error message:

'Module not found'

I haven't the foggiest.,
James
 
The message suggests there is something wrong with the database itself.

The 'module' is probably the code behind this form. Open the form in design
view. Look at the Has Module property (on the Other tab of the Properties
sheet, when viewing the properties of the *form* (not of a text box.)) If it
is No, this suggestion won't help. We'll assume it's Yes.

1. Close the database. Make a backup copy of your database, in case
something goes wrong. Open it again.

2. Make sure the Name AutoCorrect boxes are unchecked under:
Office Button | Access Options | Current Database
Explanation of why:
http://allenbrowne.com/bug-03.html

3. Compact the database, to remove any deleted stuff:
Office Button | Manage

4. Open the problem form in design view. Click the View Code icon on the
Design tab of the ribbon (far right.) Access should open a code window.

5. In the code window, Select all from this window (Ctrl+A.) Open a copy of
notepad, paste the code in (Ctrl+V), and save it as a text file. Close the
code window.

6. Set the form's Has Module property to No. Answer Yes to the confirmation
dialog, that you really do want to lose the code from the form's module.
Save the form. Close it.

7. Compact the database again.

8. Rename the form.

9. Open the renamed form in design view.
Click the View Code icon on the ribbon.
Paste the code back in from the file you saved at step 5.

10. Optional but recommended.
Complete the recovery sequence suggested here:
http://allenbrowne.com/recover.html
starting from step 4 (the decompile.)
 
I was able to rename it after I rebooted. Probably could have closed and
reopened Access.
Name AutoCorrect boxes are unchecked.
I'll do this procedure the next time it occurs.

Thanks much,
James
 
Back
Top