I have a problem with a DB I started work on a couple of years ago in Access 2010. I fired it up last week and now I'm getting an "unrecognized database format" error when I try and open the front end.
I left this project sat after the company lost interest in finishing it. Since then I worked on another project on the same dev machine which required me to install Access 2007. I had both 2010 and 2007 installed at the same time and I remember opening the now problematic db to take some snippets from some code in there for use in the other project. Im pretty sure I only opened it in 2010 at that time.
Now the company has shown interest again I need to finish the project.
Ive tried uninstalling all instances of Office and the Access Database Engine (I needed this to test the 2007 project) running a clean up and putting a fresh install of 2010 back, but Im still getting the same error. Ive tried importing the objects from the accdb file into a new db but access still throws the unrecognized database format error. The same error is given if I try to decompile as well.
Today Ive tried uninstalling office 2010 and putting a clean 2007 install to see if I can open/decompile/import from the older db under that version of access but Im faced with the same error.
The file server where I backed up to has been rebuilt since I worked on the original project and I thought that the accdb file might have been corrupted during this process as Im pulling it from the old vhd. I've also pulled backups from several locations and all the files give me the same error. Ive even tried running them on one of the clients where I know it used to work and has not been had office tampered with since I was last looking at this and still I get the same error. I know that I had compact and repair on exit set on the front end and Im wondering if I managed to inadvertently use 2007 and the last time I opened it and royally screwed it up unknowingly creating a little surprise for me here two years down the track!
I have even tried installing an "Access Recovery Toolbox" util to see what that could make of the file, and it pulls absolutely nothing back in the report.
I have a much older version of the db which works on my dev machine but Im at a massive loss if I have to start work from this version as I made some very significant changes between these versions including changes to the back end table structure.
Any light anyone can shine, even if it just means getting the VBA out into a text file would be really helpful!!
TIA
Have you tried creating a new DB and pulling in the tables, forms, etc from the bad DB? I would recommend doing it incrementally and checking the new DB after each import. IE just bring in the tables and then see if they are healthy before moving on.
Related
I have been trying since yesterday and beating my head against a wall trying to obtain data from an excel provider.
I have literally tried everything. I double checked so as to make sure whether my version of excel is 32 bit, it is 32 bit. I even installed the x64 version of Microsoft database engine it still did not change the slightest thing. I have changed Run64BitRuntime to false and delay validation to true. Nothing has changed in the slightest. I have tried using the work book from 2003-2007 and 2007+ to save and then use it still has not changed a single thing. It feels like i am banging my head against the wall after watching countless youtube videos tons of online articles and it still does not seem to work. I would really appreciate some help. The version of Visual Studio i am using is 2019.
SSIS transferring data from Excel could not retrieve table information is the error message i always get after tons of tries.
Have you tried all Excel versions in the Excel Connection Manager? Also, close the Excel workbook while working on the SSIS package.
I have an Access, 2007 – 2016, accdb database on my Toshiba Satellite Pro running Windows 7 32 bit. I am using MS Office 365.
The database that opens at its home page, but any attempt to open a table, form or module brings up this message:
“The database cannot be opened because the VBA project contained in it cannot be read…”
I have 2 backups of this database, but they do the same thing.
I have read several posts on the internet that indicate that the problem can be solved by decompiling the database.
I have tried the VBS Script solution contained in:
How does one decompile and recompile a database application?
However, it does not get to decompile as the same message displays when the .vbs file opens the database.
I have read some other posts that indicate a problem with a VBA7 file, but these refer to Access 2010, so I do not know if they also apply to me. I have VBA7.1 by the way.
Attempts to decompile through the Command Prompt has its own problems that seem to be associated with file names with spaces.
So, I’m stuck. Any help would be much appreciated
I ran into this same error at work, Have you tried shift-clicking and opening? I know that seems obvious, What I did, was I got the DB open in safe mode, and opened up a module in the vba editor, and tried to fight the problematic code, if anything you could delete all your modules after copying them into a notepad.
I also right clicked and restored previous versions from windows, I am not sure if you have tried this when you say you have to back ups, but i was unaware of this fix and i luckily had a version from last week that fixed my issue.
So currently my boss and I are the two employees that work on our company's access database. I just got Office 2013 on my computer and he is will working with 2010. We have ran into some inexplicable bugs with the database.
Most of these can be fixed by just copying an old version of a form or report into the database when it fails; however, it is quite disconcerting when we spend hours trying to discover why something is wrong and are able to fix it without explaining why.
Most of the issues so far have occurred when I am using the db in Access 2013. So far the issues have been:
Access occasionally crashes and restarts when I am working in the VB code
Some forms bug out for no reason. It yet again occurs when I am working in the VB code if there is a compile erro. To further explain the "bugging out", the form usually contains about 2000 separate forms that you can search through, but when it bugs out it will only show one blank form. At first I panicked thinking all the table's data was gone, but nothing changed the table
There have been other hiccups, but nothing noteworthy besides these two
I guess my question is if anyone else has had issues along these lines, or if they knew of any other known issues. I tried to research errors people have been having, but I couldn't find anything besides Microsoft's official release of what features were being deleted.
As always, thanks in advance!
Your system should be split into two files. FE(front end) containing all forms, queries, code, etc., linked to the BE. BE(back end) containing the data tables only.
Maintain a development copy of the FE that is only used for making modifications.
Each user should have their own copy of the FE on their local machine. If you don't know how to split, just search for it as there are plenty of instructions out there.
I have 2010, but I worked with a consultant who worked on the same project in 2013. I too, saw some behavior that looked like version related bugs, but nothing definite.
Responding to your list:
Access occasionally crashes and restarts when I am working in the VB code -- This has happened to me in every version of Access I have used, from 97 to 2010.
Some forms bug out for no reason. It yet again occurs when I am working in the VB code if there is a compile error... -- If the compile error is severe enough to lose project state, this is not surprising.
Recommendations:
Decompile your application front-end occasionally, especially when 'weird' errors show up. See this SO link: automating decompile / recompile in ms-access
Compact & Repair at least daily while developing your application
Backup! Do this at least for every significant revision. Sometimes, the Access front-end will become so corrupt that it trashes all of your work. When this happens, nothing is recoverable.
I have an accdb backend database with an accde front end which consists of an input form with some VBA validation on a network drive.
However all of a sudden about a week ago I started getting the following error message:
the database cannot be opened because the vba project contained in it
cannot be read
So I went through the following procedure:
I replaced the frontend with a backup which immediately got corrupted
I replaced both the front and back end with previously functional backups but still the corruption issue again.
I rebuilt both files from the ground up but still they keep getting corrupted
I've tested it on my pc and it works fine, transfered it to the network and it may work on a particular pc only to be corrupted by the next one rendering it useless again!
I'm really stumped with this one and I'm in big trouble because it is a critical production DB and all data collection is at a standstill until I can get it up and running again so any help would be really appreciated!! I've been banging my head against a wall with this for 3 days now...
The answer of another person who had a similar problem.
http://social.msdn.microsoft.com/Forums/office/en-US/483554ee-3041-47ab-83a6-f8ad5aca6d66/the-database-cannot-be-opened-because-the-vba-project-contained-in-it-cannot-be-read
Answer marked:
It was the C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA7\vba7.dll version the one that had the error were
7.0.15 and we compiled on 7.0.16 when we overwrote them it no longer gave an error.
Last week I was modifying portions of two modules in an access 2010 db when the program crashed, and would crash every time I tried opening up the db thereafter. I was able to create a new database and import the tables and queries from the corrupted one, but when I tried to import the forms/macros/modules the new database would start crashing also. I keep daily backups, but ended up losing several hours worth of work. This happened twice last week, each time MS Access would crash without warning and the VBA was unrecoverable.
The functionality works as intended until the db crashes seemingly at some unknown point. There must be some sort of issue with my VBA code, since this only started happening when I started modifying the module last week, but I can't pinpoint it since the crashes actually occurred when nothing was being executed. Ie during save.
Does anyone know if it's possible to export the VBA out of access without exporting it to another database? Ie export it without having to use MS Access to do so. On a related note, has anyone created a library that exports query definitions, table schema, and all VBA to text files that I could drop them into source control?
Thanks.
In addition to the method suggested by #Remou, you could try the SaveAsText method to save a code module to a text file.
Application.SaveAsText acModule, "Module1", "D:\Access\Module1.txt"
However, that doesn't satisfy your desire to do it without using Access.
Try a decompile operation on the chance your project includes saved compiled code which has been corrupted. You can find detailed instructions for decompile in the 2 answers to this Stack Overflow question: ms-access: HOW TO decompile and recompile
After decompile, make sure all your modules include Option Explicit in their Declarations sections. Check the project's references, and fix any that are broken (missing). Then run Debug->Compile from the VB editor's main menu to verify your code compiles without error.
Those steps are the best I can offer to reduce potential for continued corruption problems.
For integrating source control with Access, start with this selection of related Stack Overflow threads: site:stackoverflow.com ms-access version control
Folks
We're having the same problem. There is a bug in SP1 that causes it. If you keep opening the database, you'll finally end up with a backup that works - rename the old one BROKEN and remove the _backup from the new database, and you are oky till your next bit of development. Our IT guys (Microsoft Gold Partners) are looking at a fix reported on http://answers.microsoft.com/en-us/office/forum/office_2010-access/access-2010-sp1-you-receive-random-crashes-in/d2bf6175-075a-4a12-a2b1-f55d40af271b
I may go take a look at decompile/recompile however as some of our database have come all the way up from Access 97, to 2000, 2003 and now as mdb/2003 file format still, running under 2010. Having said that, converting to accdb/2007 seems even worse!