473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

VBA project contained in it cannot be read

I am trying to recover a database in Access 2007. I do not have a viable backup. The error message is:

"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"

I have tried to recreate the database by importing everything from this database with no luck. I have also tried many of the solutions offered on search results from Google and forums.

Does anyone have a solution to this problem?

Is there software to fix this? Or is there an easy way to rebuild the database while maintaining the VBA modules?

I would greatly appreciate any help that is offered.

Thanks,
Nathan
Mar 28 '13 #1
11 23413
Seth Schrock
2,965 Expert 2GB
I assume based on the error message that you get this when you first open the database? See if you can open the database while holding the shift key down. This will disable any code/macro that would try to run on startup. I'm not sure if this will help or not, but it is worth a try.
Mar 28 '13 #2
zmbd
5,501 Expert Mod 4TB
Basically, Your VBA is hosed.
Try opening the file while holding down the shift key...

This often happens when people with two different versions of access open the same frontend/database (another member ran into just this case not too long ago: http://bytes.com/topic/access/answer...ed-cannot-read

Have you tried to decompile?
Mar 28 '13 #3
neelsfer
547 512MB
my 2c worth. I have had a similar experience and if my memory serves my right it was vba in a specfic form that crashed everything.I imported all the tables, queries,modules etc first, and then the forms one by one into a new database to identify the culprit. From that day i have always copy and pasted my working file in the same folder, before making any changes. good luck!
Mar 28 '13 #4
Seth & zmbd,

Yes, I get the error message as soon as the database is opened. I have already tried holding in [SHIFT] while opening the database and unfortunately, it didn't work :-(

I have not tried to decompile. I will try that and get back to you.

Thanks for your input :-)
Mar 28 '13 #5
neelsfer:

I have already tried to import the tables, queries, modules, etc...however I get the same error message no matter which form I try to import :-(

Thanks for your input :-)
Mar 28 '13 #6
zmbd,

The decompile did not work...I still get the same error message.
Mar 28 '13 #7
Has anyone ever tried to recover a database with the software from SysTools entitled Access Recovery? Link for it here:
http://www.systoolsgroup.com/access-recovery.html

Not sure if this would even work for the VBA error problem or not...but I thought I would ask.
Mar 28 '13 #8
zmbd
5,501 Expert Mod 4TB
Can't comment on the tool you're looking at as I've never used it.

Does any of this fit your situation - I know it says for v2010; however, if you're doing something along this same lines in V2007 you can run into the same issue: Microsoft Access databases that are created by using the 64-bit version of Microsoft Access 2010 and that are compiled as MDE, ACCDE, and ADE files have to be recompiled in Microsoft Access 2010 Service Pack 1 (SP1) to work correctly with Access 2010 SP1

So if this is along the same lines, then get and install all of the updates for your version of Office. Then do a decompile/recompile.
Mar 28 '13 #9
zmbd
5,501 Expert Mod 4TB
Ok,
Here's a tedious method....
Open a new database - Import all of your tables and queries.
NO reports, No forms, etc... just T and Q.
We're going to use this as a "template."
Make a copy of the temp database.
Import just one form.
Close and open this file... if all is good, then, VBA - Debug Compile, database tools repair and compact. Mark the file as good.
repeat for each form.
repeat for each VBA module.
One of these is the Grim that is killing your database and this is about the only way to get at it.
You can then merge all of the good forms/code... one form at a time... so start with one of the "good" files, make a copy of it and then start your import.
Mar 28 '13 #10
zmbd
5,501 Expert Mod 4TB
One more thing... sorry, busy morning already...
When you decompiled you did use somthing like the following either in a shortcut, or via command line:
msaccess /decompile <your database name>
(you may need the full path to Access and to Your Database)

I have a shortcut on my desktop that I copied from the normal shortcut and added the decompile switch. I just do a drag and drop of the file on that when I need/want to decompile.


Can I say it... back ups are a must! (sorry, been biting my tongue on that :) )
Mar 28 '13 #11
zmbd,

Hello again...yes I did try the shortcut for the msaccess/decompile and that did not work.

On a much, much more positive note :-)

Another person at the office used your "tedious" method and that seemed to do the trick for all but the one form. I thank you very much for your help in resolving this issue.

Best Regards,
Nathan
Mar 28 '13 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bb | last post by:
Hello In my Session_OnStart in Global.asa, I am setting some cookies. One of them, I set as follows: dim UserID UserID = Request.ServerVariables("LOGON_USER") Response.Cookies("User")("ID")...
5
by: Axel Dachtler | last post by:
Hi, I have a listener problem. The listener cannot read SERVICE_NAME in TNS-Descriptor. The service-name I specified in Oracle Net Manager for this database is testdb as well. ...
2
by: Jill | last post by:
Hi I am using ms acces 2002 to read an xml file. I am using the DOM object in ms access - version xml 4 with service pack 2. here is the start of the code below. But I am having trouble reading...
0
by: Christopher Attard | last post by:
Hi, I'm using the PerformanceCounter .NET class to obtain the "% Processor Time" for processes that are running on a remote host. These processes are obtained using the...
1
by: David | last post by:
I am working on a small web app. I attempted to copy it to the remote server via. the project/copy command and when I closed the project and attempted to reopen it, I get the error "project file...
8
by: Fendi Baba | last post by:
I created an ASP.net page which opens excel. The data opens up correctly in MS office Excel 2007 but when we use a mahcine with MS Office 2003 we encountered a message, "Cannot read output file" Is...
15
by: waltbrad | last post by:
Hello. I'm studying the book "C++ Primer Plus" by Stephan Prata. In chapter 6 he gives an exercise that reads from a file. The list is thus: 4 Sam Stone 2000 Freida Flass 100500 Tammy...
4
by: pedro | last post by:
application cannot read the app.config file i have a config file for the executable i try to read it but it throws an exception when building the setup for the project vs2005 do not add the...
8
by: gkhangelani | last post by:
Hi How would I fix an error below: server.log file :
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.