Compile error

N

NetworkTrade

I compressed/repaired an A2000 mdb file that said it was 2G size - and shrunk
it down to 225M and brought it over to my desktop on a flashdrive. I run
A2002.

When I open the mdb - I receive an error message that was not happening at
the owner's desktop:

"An error occured while loading Form_FrmXYZ. Do you want to continue loading
the Project?"

FrmXYZ is not the switchboard nor the Main Form that is presented upon
open....so its "loading" during the opening of the file is not clear to me -
and I am not clear on it use of the term "Project". Nonetheless I can select
"yes" at this error prompt and continue.

FrmXYZ seems to work ok. In fact I have not yet determined anything not
working - although I know the owner has links to an outside public web store
that they download info from daily - and I haven't attempted doing that since
I am only tasked with rearranging some forms.....

When I close the mdb file I get this error prompt once again. This time I
selected "no" to the prompt and it returned this message:

"The VBA project in the database is corrupt" ......and the file will then
close.

I have opened the mdb - once again selected "yes" at the error prompt...let
it open...then immediately gone to Design View - and have selected Code to
open the VBA window. I did Tools/Debug and Debug immediately returned the
message box:

Invalid Call Procedure or Argument

That's it. It did not scroll thru any code or anything, just immediately
popped that message up. I was expecting for it to compile and show me the
coding problem....and I am half thinking it might be an attempt to link up to
the outside web store that I don't have any role in...but now I'm not sure.

Would welcome advice on where to look and what to look for...

thnx
 
A

Allen Browne

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

Then make sure the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

Then compact the database again.

If the problem persists, try exporting the form as a text file with the
undocumented:
SaveAsText acForm, "FrmXYZ", "C:\FrmXYZ.txt"
If that works, delete the form, compact the database again, verify that the
error is gone, and then import the form using:
LoadFromText acForm, "FrmXYZ", "C:\FrmXYZ.txt"

If the export fails (as it often does on a corrupt form), delete the form,
compact, and verify the error is gone. You can then create a new (blank)
mdb, and import just this one form from the original database. Then bring
this little mdb over with your flashdrive, and import the form into your big
database.
 

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