Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 973
  • Last Modified:

Unable to rename forms in the database

I am trying to rename 4 different forms in my database but get the following error message:  "Microsoft Office Access is currently unable to rename the form, report, or module to "Form_Add Detail (HS), close the database, reopen it, and then try the rename operation again.  

What originally happened is I had to close my database because of a crash and somehow 4 of my forms disappeared.  I had a backup but a lot of my changes where not on it.  So, I am trying to import my 4 forms from the backup database to the current database so I have all my changes.  I have no clue how the 4 forms got deleted in the first place.  The only way I could get them to import was to rename them with a "2" next to the name.  Now that they are there, it will not let me rename them back to the original name. I am assuming something is running that is keeping me from doing this.  I have nothing open except for the database itself, no forms, reports, tables, or query's.  
0
thirdrockit
Asked:
thirdrockit
  • 8
  • 6
  • 3
  • +1
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
looks like your db app is experiencing corruption
do a decompile

http://www.granite.ab.ca/access/decompile.htm

when done do a DEBUG>Compile from the VBA window
correct all errors that maybe raised

create a new blank db and import all the objects
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The database is corrupt. Try this:

Make a copy of the database first. Now, try to Compact and Repair your database (Tools - Database Utilities - Compact and Repair).

If that doesn't work, try to Decompile. Build a desktop shortcut with this as the Target:

"full path to msaccess.exe" "full path to your database" /decompile

If that works, then immediately Compile your application (from the VBA window, click Debug - Compile) then Compact your database (see above).

Even if these work, I'd still immediately build a new, blank database and import everything to it.

And, in the future be MUCH more diligent about making backup copies.
0
 
thirdrockitAuthor Commented:
OK, I did this.......

Make a copy of the database first. Now, try to Compact and Repair your database (Tools - Database Utilities - Compact and Repair).

And my forms showed back up.  But it reverted back to that last backup I had which did not have my changes.  Should I try to import any of this from the corrupted database or just chalk it up as a huge loss?
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
Rey Obrero (Capricorn1)Commented:
do the decompile with your corrupted db.
0
 
GRayLCommented:
You could try Tools, Options, and check Hidden under Show objects.   You can hide a form in this manner.  You should be able to recover them and then right click on the hidden form, Properties, and uncheck Hidden.  
0
 
thirdrockitAuthor Commented:
Disregard what I said before......I Compact and Repaired on the wrong file.  After trying both on the correct file, it still will not let me rename the forms to the correct names.  It is like they are running in the background but I don't have anything open.  
0
 
GRayLCommented:
Did you do as I suggested?
0
 
thirdrockitAuthor Commented:
GRayl,

I tried that.......they didn't show up so they must not be hidden.
0
 
GRayLCommented:
You could try the same for System.  Just covering all the bases.  If you cannot rename a form then something must exist that you cannot see that has that name.  
0
 
thirdrockitAuthor Commented:
I know I didn't delete the missing forms, and the are still referenced in the VB Code so I can't understand why they are not showing up.  I checked that too and still no luck.  
0
 
Rey Obrero (Capricorn1)Commented:
did you try the first suggestion?
0
 
thirdrockitAuthor Commented:
I didn't create a new DB and import all the objects.....I will try that next.
0
 
thirdrockitAuthor Commented:
how do I get the VB code to import into the new DB I created?
0
 
Rey Obrero (Capricorn1)Commented:
when you import the forms/modules/reports the vb codes goes with it.
0
 
thirdrockitAuthor Commented:
OK, it looks good now except for I need it in access 2000 format.  When I did the import I must not have saved it in 2000. Can I save it as 2000 format or do I need to start with 2000 format first?
0
 
Rey Obrero (Capricorn1)Commented:
tools>database utilities>convert database
0
 
thirdrockitAuthor Commented:
Everything looks fine now after I imported everything into a clean database file.  I was able to rename the forms to the correct names and I have been doing some general testing with no errors.  Does everyone think I am good to go with what I have now?  Is there anyway to check to make sure what I am working on now is not corrupt?

Thanks again for all of your help!
0
 
Rey Obrero (Capricorn1)Commented:
if it does not give you weird errors.. you are good to go.

always do a DEBUG > Compile after modifying your form and codes.

Compact and Repair before closing the db is a good habit to develop too.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 6
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now