Disaster Strikes Report

  • Thread starter Thread starter Bill Stanton
  • Start date Start date
B

Bill Stanton

Just completed a report design with much code
development. Previewed the report which shows
intended content. Ran Tools -> Compress, Ran
backups of the established level to LAN machine,
a local copy and a copy to a local Zip drive.

Now, report continues to appear in report directory
list, but I can no longer "Preview" or open in "Design
View". All other reports will open for preview or
design and all other functions are working normally.

PLEASE tell me that there's a known problem and
recovery procedure, lest I have to re-create about
3 days worth of development.

Thanks,
Bill
 
Bill said:
When I now either attempt to compile all of my VBA
code, I the message: "You canceled the previous
operation" repeated 5 times followd by a message:
"Module not found". The name of the module is not
given and the HELP is non-specific, so there's no
indication of what is wrong.

I have a very un-easy feeling that my source mdb
is corrupted.

It does sound that way. Take a look at Tony Toews'
Corrupt Microsoft Access MDBs FAQ on his site:
http://www.granite.ab.ca/accsmstr.htm
 
More clues........

I didn't mention in my original post that in addition
to "I can no longer "Preview" or open in "Design
View", that I also cannot open the VBA editor to
look at the report's code sheet. So, this morning
I tried to get to it via another path. Namely, to
open the code sheet of one of my modules, then
rather than close the VBA window, I closed only
the window of the current code sheet repeatedly
until I reached the code sheet of the corrupted
report.

As I reached that sheet in the "chain", I once again
got 3 or 4 more of the "You canceled the previous
operation" messages. Then again when I clicked
in the window pane to begin a copy/paste operation
to capture and save the code.

Once saved, I added a comment to the code to
effect a change. Then, proceeded to close the mdb
in the hopes that a save operation would perhaps
repair what now appears to be corrupted pointers
within the mdb. After a few more "You canceled the
previous operations" messages, I got the message
"The save operation failed". So, I allowed the close
without saving to proceed.

The only repair kit available to me is the Access
Compress & Repair and that failed to resolved
the current problem.

I've exhausted all my ideas.

Bill
 
Bill said:
Not much help there. In my case, the corruption is in
the front end and I find no evidence that the back-end
data is in anyway involved as cause.

I agree, but Tony has a brief discussion somewhere in there
about damaged objects.

Unless someone comes up with an approach to repair
the current front-end mdb. I'll back off to the production
level source and re-create the objects that have gone into
the corrupted beta level source. Since I was able to capture
the code-sheet source of the corrupted report, that only
leaves me the task of re-creating the report format and
controls, at least I'm down to hours and not days... SIGH!

That's good news. If your testing demonstrates everything
is fine, then you're done. If not, then here's some more
ideas.

Before you proceed, make sure you are working on a copy of
the corrupted mdb file. It's possible that you'll do
something to make things worse and it would be nice to be
able to revert to the original problem.

One common thing to do is to create a new, blank mdb and use
File - Import to import everything from the bad mdb. This
often, but not always, leaves the problem behind.

If the corruption is in a code module, then the
(undocumented) /DECOMPILE command line switch can be used
to discard all compiled p-code. If that works, then a
Compile All will recreate a clean set of p-code.

It is commonly recommended that you do a Compact before and
after each step in the process. Here's a sequence that
usually works for corrupted front end mdbs:

Make copy of mdb file
Compact
Decompile
Compact
Import everything to new mdb
Compact
Compile All
Compact
test if problem went away, is the same, or changed
to a different set of symptoms
If either of the latter two, scream

If the Import everything step fails, then try importing each
object one (or a few at a time) to isolated the bad
object(s?), note those and go on to import everything else.
Then, after some more screaming, restore those from known
good backup or manually recreate them.
 
Thanks Marsh!

My time might be preempted for the rest of the
day and tomorrow, so check the thread later tonight
or tomorrow night for an update of how things have
progressed.

Before I go the re-creation route, I will try the
exact sequence you suggested. For the experience,
if nothing else.

Thanks again,

Bill
 
Another trick that I have used successfully with corrupted forms and reports
is to open the object in design view, select the entire form or report or
section by section, then copy and paste into a new one. Then I do the same
with the code.

Ragnar
 
Ragnar,
The report won't open in design view nor will it preview.

I'll post the results of Marsh's suggestions as soon as I've
had the chance to run his scenario.

Bill
 
Marsh,
The corrupted mdb won't DECOMPILE. Or at least that's the
impression I get when the first thing I see is 4 or 5 of the messages
"You canceled the previous operation" followed by a module not
found message. Curious though is the fact that when that attempt
completes the code-sheet of the corrupted report displays and
Access2K thinks it's in Debug mode. There's no clue as to what
module can't be found.

Is there anyway to tell if ALL the p-code has been deleted?

By-the-way, the Compact ran without comment before I
launched the mdb with the DECOMPILE switch enabled.

Bill
 
Back
Top