Problems importing reports to new DB

P

Pants

I am attempting to import a report into a new database. One of the report
properties is....Has Module = yes....I belive that the problem I am having
involves the new databases inability to import the module associated with
this report. When I attempt the import I get 2 error messages....1.Error
accessing file. Network connection may have been lost.....2. Name conflicts
with existing module, project or object library. the report will actually
show up in the new database and run correctly, but it will not save so the
next time the database is opened it is gone. Is there some setting on the new
database preventing the import of the code? BTW I am unable to view the code
in the origional database
 
K

Klatuu

This is a corruption problem.
Here is a site that will explain how to do a decompile:
http://www.granite.ab.ca/access/decompile.htm

It may not solve the problem, but it is a good idea to start there.
I would do the following steps:
1. Make a backup of the file
2. See if you have a backup of the file. If you do, test it to make sure it
is not also corrupt. If it is not, use it. If changes have been made, you
may be able to copy them from the corrupt database using the technique below.
3. Run the decompile. If this doesn't solve the problem continue
4. Open each form and report that has code in it. Copy the code to a text
file. I recommend notepad.
5. Change the Has Module property to No
6. Save the report or form.
7. Copy the code in each standard module to a text file.
8. Create a new mdb file.
9. Import all your objects from the corrupt file to the new file, but do not
copy any code modules or system tables (ie msysObjects)
10. Open each form and report in design view. Open the report/forms module
and paste the code back into it and save it.
11. Recreate your standard modules and copy the code back into them
12. decompile the new file
13. Compile the new file
14. Pray.
 
P

Pants

okay, thanks for the suggestion....although step 14 does not exactly inspire
confidence!
 
K

Klatuu

So you would trust Microsoft over God? :)
Actually, the method I am recommending is the suggested way to recover a
corrupt database. Basically, Step 14 means that even after doing all this,
there is no guarantee.
 

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