Microsoft Visual Basic error

Anonymous
2012-04-03T15:39:06+00:00

I created a database in 2002-2003. Someone opened up the database with Access 2010. Yesterday they could not open up the database. I'm trying to open it up with Access 2003 and "Microsoft Visual Basic" pops up with exclamation mark FILE NOT FOUND?

I tried compacting the database, but I'm still getting the error.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2012-04-06T03:56:09+00:00

    My husband works for a nonprofit. Over 10 years ago he asked me to create a database--that evolved into 15 databases. I love Access, but I'm not a programmer. I guess I'm just in over my head. I'm a little overwhelmed with you generous offer! I just sent you the front and back end--hopefully I did it correctly.

    I hate to take up more of your time, but I greatly appreciate any help.

    I'm happy to help, so don't give that another thought.

    I have some bad news, though.  In the front-end database you sent me, something has deleted almost all the code.  Forms that supposedly have code behind them have no actual module.  The Switchboard form is the only one that has a module at all, and that module appears to be empty except for the "Option Compare Database" line at the top.  The standard module basAgeFunctions that is shown in the modules pane of the database window doesn't seem to exist in the VB Editor.

    I've heard of a couple of incompatibility issues involving the 64-bit version of Access 2010 and SP1 that can cause a database's VB project to be deleted (after an error message), though they don't seem exactly like what you reported, and I didn't think they would apply to an Access 2003 mdb file.  Still, Is it possible that the person who opened the database using Access 2010 was running the 64-bt version of Access, and that they say a message along the lines of this:

    <QUOTE>

    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.

    </QUOTE>

    Whatever happened, the code seems to be gone from the front-end you sent me.  Do you have a backup copy of the database from before the corruption (or whatever it was) occurred?  We should be able to take that database, split it, then relink the resulting front-end to the back-end you created.

    0 comments No comments

17 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-04-03T16:05:01+00:00

    I created a database in 2002-2003. Someone opened up the database with Access 2010. Yesterday they could not open up the database. I'm trying to open it up with Access 2003 and "Microsoft Visual Basic" pops up with exclamation mark FILE NOT FOUND?

    I tried compacting the database, but I'm still getting the error.

    Run Access as an adminstrator (right-click the Access executable file and choose "Run as adminstrator").  Then, in that Access session, open your database while holding down the Shift key.  That will probably let Access fix the references, but you may want to go into the VB Editor, click Tools -> References..." and check in the References dialog that you have the correct references set (Access 11, not Acces 14).  Possibly you will need to recompile, but I'm not sure.  At worst, you will have to decompile the database and recompile.  Do you know how to do that?

    0 comments No comments
  2. Anonymous
    2012-04-03T20:41:47+00:00

    When I right click, I'm not getting the option to run as an administrator? I'm working remotely at home. I did contact the IT guy, but he hasn't gotten back to me.

    I was just going to try and import in the tables/forms/queries, but I can't even do that--getting the same error:(

    Do you know why this happened? I'm so nervous, because I've created 15 databases for a nonprofit. Some people are now getting moved to Access 2010, but they want to keep the databases in 2003 until everyone is switched to Access 2010. 

    My remote connection is 2003 so I can't even play around with Access 2010.

    Will this happen to my other databases?

    0 comments No comments
  3. Anonymous
    2012-04-03T23:14:17+00:00

    All of the database are split except this one. The IT guy still hasn't gotten back to me. My shortcut does not give me administrative rights. I hope he came give me rights--even for just 1-2 days to fix it.

    I've never decompiled a database before, but is this all there is to it?

    C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE /decompile

    I guess I need to read up on all this:( I'm going to see if we can get a backup restored from a week ago and just see if that works.

    The first thing I'll do (if it works) is split it. Then is it OK for one user to open and use it with Access 2010 and then another user open/use it with Access 2003?

    Like I mentioned before, they want me to keep everything in 2003 until all users have 2010.

    0 comments No comments
  4. Anonymous
    2012-04-03T21:02:32+00:00

    When I right click, I'm not getting the option to run as an administrator? I'm working remotely at home. I did contact the IT guy, but he hasn't gotten back to me.

    I was just going to try and import in the tables/forms/queries, but I can't even do that--getting the same error:(

    Do you know why this happened? I'm so nervous, because I've created 15 databases for a nonprofit. Some people are now getting moved to Access 2010, but they want to keep the databases in 2003 until everyone is switched to Access 2010. 

    My remote connection is 2003 so I can't even play around with Access 2010.

    Will this happen to my other databases?

    Are you right-clicking on the Access executable, msaccess.exe, where it lives in a subfolder of the Program Files folder?  Right-clicking on an .mdb file won't give the "Run as administrator" option.

    I'm not sure what's up that you can't import the objects into another database.

    What happens when Access 2010 opens an Access 2003 database is that it updates references to the appropriate references for Access 2010, from the ones that are appropriate for Access 2003.  This involves making a change to the registry.  When you then open the database again in Access 2003, Access 2003 would normally change the references and registry back.  Unfortunately, it doesn't have the necessary permissions to update the registry unless you run it as an administrator.  If the user who opened it in Access 2010 made no other changes to the database, opening the database while running as an administrator and fixing the references manually ought to fix it.

    This problem would not occur if the database was split into front-end and back-end databases, and every user had their own version of the front-end, all linked to the same back-end database.  In such a case, each user's front-end version will naturally be configured to the version of Access that user was using, so there would be no conflicts.  Each user is insulated against the configuration changes made by any other. That is the standard way to set up a multiuser database.

    From the way you describe what happened, I conclude that you are sharing a single, monolithic database among several different users.  Especially if If you anticipate running in an environment where different users have different versions of Access, you need to split the database and set it up the way I described above.

    As for the current database with the problem, if you can't get the database to run properly by running Access as an administrator and following the steps I suggested in my original post, then you may need to decompile the database as well. Do you know how to do that?

    0 comments No comments