Can't Rename Form in AC 2007

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
 
A

Allen Browne

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.)
 
J

JamesJ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top