Question VBA loading errors on startup (1 Viewer)

delink

New member
Local time
Yesterday, 19:18
Joined
May 8, 2012
Messages
3
I have a access 2000 .mdb database being run on windows 7, access 2010. I did not design this database program.

When the database is opened, this window pops up, and if YES is selected, another 7 follow; and then it repeats.
------
Microsoft Visual Basic for Applications:An error occurred while loading Form_frmReports, Do you want
to continue loading the project?

Yes No Help
-------
If yes is answered to all the pop ups, the program seems to work OK. But it makes me nervous.

If you answer no to the pop-up, the following messages comes up:
------
Microsoft Access

The database cannot be opened because the VBA project
contained in it cannot be read. The database can be
opened only if the VBA project is first deleted. Deleting
the VRA project removes all code from modules, forms and
reports. You should back up your database before attempting
to open the database and delete the VBA project.

To create a backup copy, click Cancel and then make a
backup copy of your database. To open the database and
delete the VBA project without creating a backup copy,
click OK.

[ 0K ] [__Cancel__] [ Help ]
--------
I don't want to do this!

I have compacted, repaired, decompiled the database. I have opened the pop-up'd forms and reports, they open without errors. I have run the macros that open the forms and they run without errors.

If I open VB the macros do not appear in the project, just the forms and report objects (in the pop-ups).

I do not know how to proceed. I was thinking of re-creating the macros and possibly their associated forms and reports to see if the re-creations would have the same issues.

Help is appreciated; Thank you.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:18
Joined
Feb 19, 2002
Messages
43,466
You didn't say that you compiled. I'm assuming that the app compiles without error.

The ultimate solution when all the other things fail to ferret out the corruption is to rebuild the database from scratch. Create a new empty database. Import the tables and queries. Close, backup. Reopen and import the forms. Close, backup, Reopen and import the reports, then macros, then modules. compile. Add any missing references, fix any compile errors. Close, backup. Reopen, set the startup form, turn off Name AutoCorrect, change any other database properties. Close, backup. Run.

The reason for all the stops and backups is that occassionally, you can't actually import the corrupt object so you always want fall back positions so you don't have to go back to ground zero.
 

delink

New member
Local time
Yesterday, 19:18
Joined
May 8, 2012
Messages
3
Pat,

THanks for your quick response.

I thought I was able to compile at one point, but now it will not. I get "Invalid procedure call or argument (Error 5)".

I will go ahead and re-create the app per your instructions.

Thanks you again,

Diane
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:18
Joined
Feb 19, 2002
Messages
43,466
You will need to fix the compile error also.
 

Users who are viewing this thread

Top Bottom