Home > Archive > MS Access data conversion > April 2005 > 2002 database corrupt and unuseable after upgrading to Access 2003









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 2002 database corrupt and unuseable after upgrading to Access 2003
James Carpenter

2005-04-06, 8:05 pm

I'm seeking advice on an Access 2002 database with VBA code which will not
open in Access 2003. The database was operating successfully under Access
2002, and was compacted and repaired before the 2003 upgrade was installed.
It is a single-user database still under development; there are several
backup copies, all displaying these symptoms.

The database has an autostart form which displays a few seconds, then closes
and launches the main switchboard. Launching in 2003 generates the Microsoft
Visual Basic message while the form displays: "An error occurred while
loading 'Report_R_Agg_S_I'. Do you want to continue loading the project?"
This refers to an empty class module.

Clicking "no" produces the message "The VBA project in the database is
corrupt."

Clicking "yes" gives the message "Invalid procedure call or argument" and
opens the debugger to a module that isn't running at this point.

Opening the database with the shift key down bypasses the autostart form,
but then opening the VBA code produces the same sequence of errors.

Converting the database isn't possible because it is already in 2002-2003
format. Compact and repair under 2003 generates the same sequence of error
messages and fails.

Has anyone experienced similar problems? If so, how were they resolved?
Sorry so wordy; just trying to describe the situation as completely as I can.
Thanks to anyone who can offer help!
Allen Browne

2005-04-06, 8:05 pm

James, it sounds like you have a partially corrupted A2002 database. When
converted to A2003, the corruption shows up, but you can still open/use it
in A2002?

If so, a decompile might fix the problem. Access keeps 2 copies of the code:
the text vesion that you view and edit, and the compiled version that
actually runs. If these two get out of sync, the project is partially
corrupt. This is fairly common when you are altering the objects, especially
if you edit the code while it is running (i.e. in break mode.)

To fix it, try this sequence:
1. Make a backup of the A2002 mdb file, while it is not in use, so you get
multiple tries at this.

2. Opn A2002. Uncheck the Name AutoCorrect boxes under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

3. Open the report named R_Agg_S_I in design view, and set its Has Module
property to No. (On the Other tab of the Properties box.)

4. Compact: Tools | Database Utilities | Compact. Close Access.

5. Decompile, 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\msacce
ss.exe" /decompile
" c:\MyPath\MyDatabase
.mdb"

6. Open A2002. Compact again. Close.

7. Try the conversion to A2003 again.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"James Carpenter" < JamesCarpenter@discu
ssions.microsoft.com> wrote in
message
news:ECDCB8AD-25D6-4624-8FB2- 0E7812578600@microso
ft.com...
> I'm seeking advice on an Access 2002 database with VBA code which will not
> open in Access 2003. The database was operating successfully under Access
> 2002, and was compacted and repaired before the 2003 upgrade was
> installed.
> It is a single-user database still under development; there are several
> backup copies, all displaying these symptoms.
>
> The database has an autostart form which displays a few seconds, then
> closes
> and launches the main switchboard. Launching in 2003 generates the
> Microsoft
> Visual Basic message while the form displays: "An error occurred while
> loading 'Report_R_Agg_S_I'. Do you want to continue loading the project?"
> This refers to an empty class module.
>
> Clicking "no" produces the message "The VBA project in the database is
> corrupt."
>
> Clicking "yes" gives the message "Invalid procedure call or argument" and
> opens the debugger to a module that isn't running at this point.
>
> Opening the database with the shift key down bypasses the autostart form,
> but then opening the VBA code produces the same sequence of errors.
>
> Converting the database isn't possible because it is already in 2002-2003
> format. Compact and repair under 2003 generates the same sequence of error
> messages and fails.
>
> Has anyone experienced similar problems? If so, how were they resolved?
> Sorry so wordy; just trying to describe the situation as completely as I
> can.
> Thanks to anyone who can offer help!



George Nicholson

2005-04-06, 8:05 pm

Allen:
Question: what is likely to happen if he tries Step #5 (the decompile)
in 2003 as-is?

--
George Nicholson

Remove 'Junk' from return address.


"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:e4Veyb4IFHA.1360@TK2MSFTNGP10.phx.gbl...
> James, it sounds like you have a partially corrupted A2002 database. When
> converted to A2003, the corruption shows up, but you can still open/use it
> in A2002?
>
> If so, a decompile might fix the problem. Access keeps 2 copies of the
> code: the text vesion that you view and edit, and the compiled version
> that actually runs. If these two get out of sync, the project is partially
> corrupt. This is fairly common when you are altering the objects,
> especially if you edit the code while it is running (i.e. in break mode.)
>
> To fix it, try this sequence:
> 1. Make a backup of the A2002 mdb file, while it is not in use, so you get
> multiple tries at this.
>
> 2. Opn A2002. Uncheck the Name AutoCorrect boxes under:
> Tools | Options | General
> Explanation of why:
> http://allenbrowne.com/bug-03.html
>
> 3. Open the report named R_Agg_S_I in design view, and set its Has Module
> property to No. (On the Other tab of the Properties box.)
>
> 4. Compact: Tools | Database Utilities | Compact. Close Access.
>
> 5. Decompile, 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\msacce
ss.exe" /decompile
> " c:\MyPath\MyDatabase
.mdb"
>
> 6. Open A2002. Compact again. Close.
>
> 7. Try the conversion to A2003 again.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "James Carpenter" < JamesCarpenter@discu
ssions.microsoft.com> wrote in
> message
> news:ECDCB8AD-25D6-4624-8FB2- 0E7812578600@microso
ft.com...
>
>



Allen Browne

2005-04-06, 8:05 pm

That will depend on the kind of corruption, but given that A2003 is barfing
on it while A2002 is not, that may not be a productive approach.

Of course, if you try on a copy and it messes up, nothing is lost.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George Nicholson" <JunkGeorgeN@msn.com> wrote in message
news:eChaOcEJFHA.2604@TK2MSFTNGP15.phx.gbl...
> Allen:
> Question: what is likely to happen if he tries Step #5 (the decompile)
> in 2003 as-is?
>
> --
> George Nicholson
>
> Remove 'Junk' from return address.
>
>
> "Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
> news:e4Veyb4IFHA.1360@TK2MSFTNGP10.phx.gbl...
>
>



david epsom dot com dot au

2005-04-06, 8:05 pm

> decompile might fix the problem. Access keeps 2 copies of the code:

My impression was, 3 copies if you 'enable' a database: source
copy, 2K2 compiled copy, 2K3 compiled copy. Or was that only
A97/A2K (vba5/vba6) ??

(david)

"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message
news:e4Veyb4IFHA.1360@TK2MSFTNGP10.phx.gbl...
> James, it sounds like you have a partially corrupted A2002 database. When
> converted to A2003, the corruption shows up, but you can still open/use it
> in A2002?
>
> If so, a decompile might fix the problem. Access keeps 2 copies of the
> code: the text vesion that you view and edit, and the compiled version
> that actually runs. If these two get out of sync, the project is partially
> corrupt. This is fairly common when you are altering the objects,
> especially if you edit the code while it is running (i.e. in break mode.)
>
> To fix it, try this sequence:
> 1. Make a backup of the A2002 mdb file, while it is not in use, so you get
> multiple tries at this.
>
> 2. Opn A2002. Uncheck the Name AutoCorrect boxes under:
> Tools | Options | General
> Explanation of why:
> http://allenbrowne.com/bug-03.html
>
> 3. Open the report named R_Agg_S_I in design view, and set its Has Module
> property to No. (On the Other tab of the Properties box.)
>
> 4. Compact: Tools | Database Utilities | Compact. Close Access.
>
> 5. Decompile, 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\msacce
ss.exe" /decompile
> " c:\MyPath\MyDatabase
.mdb"
>
> 6. Open A2002. Compact again. Close.
>
> 7. Try the conversion to A2003 again.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "James Carpenter" < JamesCarpenter@discu
ssions.microsoft.com> wrote in
> message
> news:ECDCB8AD-25D6-4624-8FB2- 0E7812578600@microso
ft.com...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com