Database cannot be opened...VBA

D

Donna

I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
 
J

Joan Wild

I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild
 
D

Donna

It appears that Access 2007 does not like this database. I don't have this
trouble with any other databases that have similar coding. Could it be from
conversions? I originally created this database in Access 2000, then we
upgraded to Access 2003 and it went through a conversion process.

The procedures that are giving me errors are simple things such as
RecordsetClone FindFirst, and Bookmark = RecordsetClone. I have an unbound
list box with people's names linked to a subform. When I select a name in the
dropdown list, it is supposed to show me that person's info. I have the
procedure in the AfterUpdate event. Now, when I select a name from the
dropdown list I get an error message "Invalid procedure call or argument". I
don't know what to do to "fix" it. That same code is used in my other
databases that work fine. I was unable to compile the database. I have a
terrible feeling I'm going to have to redesign this database and I sure do
dread it.
Got any other suggestions? :)

Joan Wild said:
I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild

I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
.
 
J

Joan Wild

Are you saying that the Compile returned no errors?

In the same window, go to Tools, References and report back with what is
checked. If any are marked as 'missing', make a note of them, uncheck
them, close the dialog, and compile.

Joan Wild

It appears that Access 2007 does not like this database. I don't have this
trouble with any other databases that have similar coding. Could it be from
conversions? I originally created this database in Access 2000, then we
upgraded to Access 2003 and it went through a conversion process.

The procedures that are giving me errors are simple things such as
RecordsetClone FindFirst, and Bookmark = RecordsetClone. I have an unbound
list box with people's names linked to a subform. When I select a name in the
dropdown list, it is supposed to show me that person's info. I have the
procedure in the AfterUpdate event. Now, when I select a name from the
dropdown list I get an error message "Invalid procedure call or argument". I
don't know what to do to "fix" it. That same code is used in my other
databases that work fine. I was unable to compile the database. I have a
terrible feeling I'm going to have to redesign this database and I sure do
dread it.
Got any other suggestions? :)

Joan Wild said:
I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild

I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
.
 
D

Donna

No ma'am. There were lots of errors, too many. I checked for Missing
references first sign of problems but none were missing. I'm trying to
remember back to when I made this database, that was in spring of 2000. With
many of the forms I used the wizard when I was wanting the list box look up a
record on the form. After using the wizard a few times I got to copying the
code for other forms and adjusted the form names.

Same for some of the close buttons. I only have 6 macros in this database,
the rest of it is simple code in forms and reports. I was looking in the
design view of a macro and there are little yellow triangle symbols on every
line. I think it's a security issue with this database and I'm going to have
to do the digital signature. I designated the folder as a trusted site.

I'm rambling, sorry. I'm going to keep poking around to see what other
errors I find. Sure glad my other databases aren't doing this. :)


Joan Wild said:
Are you saying that the Compile returned no errors?

In the same window, go to Tools, References and report back with what is
checked. If any are marked as 'missing', make a note of them, uncheck
them, close the dialog, and compile.

Joan Wild

It appears that Access 2007 does not like this database. I don't have this
trouble with any other databases that have similar coding. Could it be from
conversions? I originally created this database in Access 2000, then we
upgraded to Access 2003 and it went through a conversion process.

The procedures that are giving me errors are simple things such as
RecordsetClone FindFirst, and Bookmark = RecordsetClone. I have an unbound
list box with people's names linked to a subform. When I select a name in the
dropdown list, it is supposed to show me that person's info. I have the
procedure in the AfterUpdate event. Now, when I select a name from the
dropdown list I get an error message "Invalid procedure call or argument". I
don't know what to do to "fix" it. That same code is used in my other
databases that work fine. I was unable to compile the database. I have a
terrible feeling I'm going to have to redesign this database and I sure do
dread it.
Got any other suggestions? :)

Joan Wild said:
I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild


Donna wrote:
I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
.
.
 
J

Joan Wild

Until you fix the errors, you won't get too far.

Since it's been converted a number of times, I'd try to create a new
2007 mdb, and import from the old. Compile and compact. You'll need to
fix any errors it finds.

See if Allen Browne has any pointers on his site:
http://allenbrowne.com/Access2007.html

Joan Wild

No ma'am. There were lots of errors, too many. I checked for Missing
references first sign of problems but none were missing. I'm trying to
remember back to when I made this database, that was in spring of 2000. With
many of the forms I used the wizard when I was wanting the list box look up a
record on the form. After using the wizard a few times I got to copying the
code for other forms and adjusted the form names.

Same for some of the close buttons. I only have 6 macros in this database,
the rest of it is simple code in forms and reports. I was looking in the
design view of a macro and there are little yellow triangle symbols on every
line. I think it's a security issue with this database and I'm going to have
to do the digital signature. I designated the folder as a trusted site.

I'm rambling, sorry. I'm going to keep poking around to see what other
errors I find. Sure glad my other databases aren't doing this. :)


Joan Wild said:
Are you saying that the Compile returned no errors?

In the same window, go to Tools, References and report back with what is
checked. If any are marked as 'missing', make a note of them, uncheck
them, close the dialog, and compile.

Joan Wild

It appears that Access 2007 does not like this database. I don't have this
trouble with any other databases that have similar coding. Could it be from
conversions? I originally created this database in Access 2000, then we
upgraded to Access 2003 and it went through a conversion process.

The procedures that are giving me errors are simple things such as
RecordsetClone FindFirst, and Bookmark = RecordsetClone. I have an unbound
list box with people's names linked to a subform. When I select a name in the
dropdown list, it is supposed to show me that person's info. I have the
procedure in the AfterUpdate event. Now, when I select a name from the
dropdown list I get an error message "Invalid procedure call or argument". I
don't know what to do to "fix" it. That same code is used in my other
databases that work fine. I was unable to compile the database. I have a
terrible feeling I'm going to have to redesign this database and I sure do
dread it.
Got any other suggestions? :)

:

I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild


Donna wrote:
I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
.
.
 
D

Donna

I asked IT to restore a copy from a date before the upgrade. I opened the
restored database and it works perfectly! I don't know what went wrong before
but I'm very relieved to have it working.
Thank you so much for the link from previous post. I have it bookmarked and
have found it to be full of great tips and advice for any future problems we
may run into. Thanks Joan!

Joan Wild said:
Until you fix the errors, you won't get too far.

Since it's been converted a number of times, I'd try to create a new
2007 mdb, and import from the old. Compile and compact. You'll need to
fix any errors it finds.

See if Allen Browne has any pointers on his site:
http://allenbrowne.com/Access2007.html

Joan Wild

No ma'am. There were lots of errors, too many. I checked for Missing
references first sign of problems but none were missing. I'm trying to
remember back to when I made this database, that was in spring of 2000. With
many of the forms I used the wizard when I was wanting the list box look up a
record on the form. After using the wizard a few times I got to copying the
code for other forms and adjusted the form names.

Same for some of the close buttons. I only have 6 macros in this database,
the rest of it is simple code in forms and reports. I was looking in the
design view of a macro and there are little yellow triangle symbols on every
line. I think it's a security issue with this database and I'm going to have
to do the digital signature. I designated the folder as a trusted site.

I'm rambling, sorry. I'm going to keep poking around to see what other
errors I find. Sure glad my other databases aren't doing this. :)


Joan Wild said:
Are you saying that the Compile returned no errors?

In the same window, go to Tools, References and report back with what is
checked. If any are marked as 'missing', make a note of them, uncheck
them, close the dialog, and compile.

Joan Wild


Donna wrote:
It appears that Access 2007 does not like this database. I don't have this
trouble with any other databases that have similar coding. Could it be from
conversions? I originally created this database in Access 2000, then we
upgraded to Access 2003 and it went through a conversion process.

The procedures that are giving me errors are simple things such as
RecordsetClone FindFirst, and Bookmark = RecordsetClone. I have an unbound
list box with people's names linked to a subform. When I select a name in the
dropdown list, it is supposed to show me that person's info. I have the
procedure in the AfterUpdate event. Now, when I select a name from the
dropdown list I get an error message "Invalid procedure call or argument". I
don't know what to do to "fix" it. That same code is used in my other
databases that work fine. I was unable to compile the database. I have a
terrible feeling I'm going to have to redesign this database and I sure do
dread it.
Got any other suggestions? :)

:

I would:
1. backup the database
2. open it, holding down the shiftkey to bypass any startup code.
3. Open any module and use Debug, Compile
4. If it compiles without error, then compact the database. If there's
errors, then fix them.
5. Close, and reopen and see if it's OK.

Joan Wild


Donna wrote:
I have a 2003 database I'm trying to open in 2007. It wants to open a
specific report, unsure why it selected that report, but when I tell it to
cancel opening that report, I get this other lengthy message without an error
code. This is the message:

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 VBA 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. [end of message]

I hardly want to delete all the code I've put into this database. There
isn't anything real complicated in it. Mostly "on click" events to open
forms. I have an auto exec file that opens a form, and it is there, but I
don't understand why it wants to open a report before the auto exec form???

The entire database is locked up at this point. The only way I can close the
database and get out of this error loop is to ctrl+alt+del and get the task
manager to close it.

The OS is WindowsXP and has SP2 on it. This is my primary database at work,
really need it to work with the code. Can someone help me with this?
.

.
.
 

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