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-04T00:17:42+00:00

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

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

    Not quite:

    "C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE"  "C:/somepath/yourdatabase.accdb" /decompile

    You have to specify which database you want to decompile.

    0 comments No comments
  2. Anonymous
    2012-04-04T01:06:53+00:00

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

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

    Almost, but if you are running Access 2003, you should be looking at the Office11 version of Access.  The line you posted is for Office 14; that is, Access 2010.  Assuming Access 2003 is installed in the default location, your line would be:

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

    When Access has started, open your database in that session of Access and it will be decompiled. Hold down the Shift key while your database opens, to prevent it from running its startup code, which would force it to compile before you've had a chance to check and correct the references.

    John Vinson is mistaken in thinking that the database must be opened as part of the command line that uses the /decompile switch.  That works, but it isn't necessary.  If you start Access with that command-line switch, the first database you open in that session will be decompiled.

    0 comments No comments
  3. Anonymous
    2012-04-04T01:08:12+00:00

    Not quite:

    "C:\Program Files\Microsoft Office\Office14\MSACCESS.EXE"  "C:/somepath/yourdatabase.accdb" /decompile

    You have to specify which database you want to decompile.

    Actually, you don't.  You can start Access with the /decompile switch, without specifying the database to open.  Then the next database you open in that session will be decompiled.

    0 comments No comments
  4. Anonymous
    2012-04-04T01:09:33+00:00

    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?

    Assuming you give each user their own copy of the front-end, then the A2010 users can open their front-ends, and the A2003 users can open their front-ends, withuot interfering with each other.

    0 comments No comments