Solved Perhaps Ghosts Are In My Database! (1 Viewer)

Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
Hi all,

I seem to have multiple problems with my new local Access database (Access 2010) with behavior's I can't explain. My main problem right now is that for the strangest reason, I can't even copy and paste a copy of an existing form (I've tried to do to use for testing purposes to find other issues). If I try and copy and paste a form, I get a load of different error messages.

For example:
"The search key was not found in any record" OR
"Name conflicts with existing module, project, or object library" (I've tried completely different names or similar names and nothing will allow me to take a copy of the form. OR
"The Microsoft Access database engine could not find the object "Copy of frmTest". Make sure the object exists and you spell it's name and path correctly. If "copy of frmTest"is not a local object, check your network connection or contact your server Administrator."

Other times the database simply won't do it, but close Access and reopen Access and the database without pasting a copy of the form.

In a nutshell, it simply refuses to make a copy of the form.

Over the last 4 days, I've tried:
1) Compact and Repair
2) Rebooted the machine several times
3) I've used the Windows 10 Reset and therefore had to reinstall Microsoft Office
4) I've tried creating a new database and importing tables, queries, forms etc

None of those have worked.

Would anyone be able to shed some new light please?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 03:19
Joined
Jul 9, 2003
Messages
16,271
Create a completely new blank database, create a form and then see if you can make a copy of that form. If you can, then you can be reasonably sure there's something wrong with your actual database.

With the new database you have created, delete the testing forms. Select all the objects in the offending database and import them into your completely new blank database. See if that cures the problem...

Before you do anything, make a backup or several backups of your database/databases!
 
Last edited:

GPGeorge

Grover Park George
Local time
Yesterday, 19:19
Joined
Nov 25, 2004
Messages
1,829
Hi all,

I seem to have multiple problems with my new local Access database (Access 2010) with behavior's I can't explain. My main problem right now is that for the strangest reason, I can't even copy and paste a copy of an existing form (I've tried to do to use for testing purposes to find other issues). If I try and copy and paste a form, I get a load of different error messages.

For example:
"The search key was not found in any record" OR
"Name conflicts with existing module, project, or object library" (I've tried completely different names or similar names and nothing will allow me to take a copy of the form. OR
"The Microsoft Access database engine could not find the object "Copy of frmTest". Make sure the object exists and you spell it's name and path correctly. If "copy of frmTest"is not a local object, check your network connection or contact your server Administrator."

Other times the database simply won't do it, but close Access and reopen Access and the database without pasting a copy of the form.

In a nutshell, it simply refuses to make a copy of the form.

Over the last 4 days, I've tried:
1) Compact and Repair
2) Rebooted the machine several times
3) I've used the Windows 10 Reset and therefore had to reinstall Microsoft Office
4) I've tried creating a new database and importing tables, queries, forms etc

None of those have worked.

Would anyone be able to shed some new light please?
Re: #4

It may be better to take a slightly different approach. Instead of bulking importing ALL objects into a new accdb, start with just tables. Make sure they all work as expected. Now, import queries. Open each of them in turn, again making sure that all of them work as expected. Do the same for all VBA standalone modules.

Now, the tedious step. Import a form. Try it out. Can you copy paste that form? Does it open properly (it might not if it has dependencies on other forms or code modules)? Do that for each form in turn. As long as the newest form imported works as expected, you're good. At some point, though, does it no longer work? I.e. does the last form imported refuse to copy/paste?

The overall goal is to isolate the problem, if possible, to one form, and concentrate on replacing or rebuilding it.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:19
Joined
Feb 19, 2002
Messages
43,223
This database is still a work in process so this is the first time I'm posting it. I haven't written the instructions on how to use it. It contains code that exports your objects to text. This is the best way to get rid of corruption so I would use it as a middle step in the procedure George outlined. Export all the objects to text (except the tables). And then import them group by group or one by one. You will need to copy the form and code modules to your own database in order to use them.
 

Attachments

  • RecreateAppByImportingFromText_20220318.zip
    654.7 KB · Views: 269

bastanu

AWF VIP
Local time
Yesterday, 19:19
Joined
Apr 13, 2010
Messages
1,402
I don't think I've seen any mentioning of suggesting to decompile the existing file first. I would start with that then open the VBE window and try to compile it; make sure you go through every single compile error and address it properly. Finally do another compact and repair.


Cheers,
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 21:19
Joined
Feb 28, 2001
Messages
27,138
One other thing I would add, and it is MINOR. I would emphasize that you should create the empty database and then import the items - as opposed to creating the empty database and then opening the old DB and EXPORTING the items to the new DB.

You can do either, but if you have corruption in the old DB, you are better off not having it as the primary DB in your workspace.
 

sxschech

Registered User.
Local time
Yesterday, 19:19
Joined
Mar 2, 2010
Messages
792
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
Create a completely new blank database, create a form and then see if you can make a copy of that form. If you can, then you can be reasonably sure there's something wrong with your actual database.

With the new database you have created, delete the testing forms. Select all the objects in the offending database and import them into your completely new blank database. See if that cures the problem...

Before you do anything, make a backup or several backups of your database/databases!
That's a great idea. I didn't try that with a new database to isolate whether it's this database or something with Access or my computer.

No worries, I have so many backups of the database in various folders now, after days of trying to isolate the problem at various points.

Importing the objects into a new database sounds smart too- thank you for these ideas...more things for me to try.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
Re: #4

It may be better to take a slightly different approach. Instead of bulking importing ALL objects into a new accdb, start with just tables. Make sure they all work as expected. Now, import queries. Open each of them in turn, again making sure that all of them work as expected. Do the same for all VBA standalone modules.

Now, the tedious step. Import a form. Try it out. Can you copy paste that form? Does it open properly (it might not if it has dependencies on other forms or code modules)? Do that for each form in turn. As long as the newest form imported works as expected, you're good. At some point, though, does it no longer work? I.e. does the last form imported refuse to copy/paste?

The overall goal is to isolate the problem, if possible, to one form, and concentrate on replacing or rebuilding it.
Thanks GPGeorge. That sounds like a smart and methodical approach to try and isolate the issue/s. Thank you for your input.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
This database is still a work in process so this is the first time I'm posting it. I haven't written the instructions on how to use it. It contains code that exports your objects to text. This is the best way to get rid of corruption so I would use it as a middle step in the procedure George outlined. Export all the objects to text (except the tables). And then import them group by group or one by one. You will need to copy the form and code modules to your own database in order to use them.
Awesome Pat. Thank you for your generosity is making that available to try. I will give that a go in combination with George's approach.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
I don't think I've seen any mentioning of suggesting to decompile the existing file first. I would start with that then open the VBE window and try to compile it; make sure you go through every single compile error and address it properly. Finally do another compact and repair.


Cheers,
This is awesome bastanu- as a rookie I've never seen or heard of this. I tried doing a google search but clearly I wasn't searching for the right thing. Thanks a lot for posting the link.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
One other thing I would add, and it is MINOR. I would emphasize that you should create the empty database and then import the items - as opposed to creating the empty database and then opening the old DB and EXPORTING the items to the new DB.

You can do either, but if you have corruption in the old DB, you are better off not having it as the primary DB in your workspace.
Thanks The_Doc_Man. I did import items- so I think I did it right according to what you just said.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
This probably isn't your situation, but happened to come across this, worth a look. Could it be related to trusted locations?

This is definitely worth a look- thank you for taking the time to share the link. I know it was a long shot but for some reason I suspected something to do with Windows/Access- hence reinstalling. This is worth looking into too. You never know.
 
Local time
Today, 11:49
Joined
Feb 27, 2022
Messages
49
Hi all,

Just a small update to all of you that gave me help and advice, after taking the time to rebuild the database bit by bit and test inbetween stages (testing each query, form etc), the new one seems to be working ok now. Thank you for all your time and help. That method appears to have frightened off the ghosts that were causing havoc in the old version!
 

Users who are viewing this thread

Top Bottom