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-04T02:03:27+00:00

    That's what I love about this forum... I learn something all the time! Thanks Dirk.

    0 comments No comments
  2. Anonymous
    2012-04-05T12:41:45+00:00

    The IT will not give me administrative rights. I sending the database to me at home, but Outlook is blocking Access. I thought I could create a Dropbox and put it there. When I downloaded dropbox, I got the message that since I'm not an administrator, I may not be able to do do certain things. I do see my files and can pull them up on the remote, but when I copy the database to dropbox (from the remote), I'm not able to view it on my home dropbox??????

    Then I realized I can't decompile, because I'm running 2010 at home. My remote is 2003. The database was created in 2003. The user opened it in 2010.

    So here are my thoughts to fix this--are these the correct steps?

    1. I'm going to email the IT person and ask him to run this (from 2003).

    "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE"  "C:/somepath/consumeroutcome.mdb" /decompile

    Is that it or does something else need to be done--recompile?

    1. Ask him to compact and repair.
    2. Then I can open the database in 2003 and it should work. Then I'll split the database for the different users.
    3. The 2010 user will then open his copy.
    4. The 2003 will open their copy in 2003.

    Then I shouldn't have any problems?

    Thanks so much!


    0 comments No comments
  3. Anonymous
    2012-04-05T17:14:46+00:00

    The IT guy decompiled the database with the following command!!!!

    C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE"  "C:/somepath/consumeroutcome.mdb" /decompile

    I was able to open it in 2003. I didn't get any errors coming up, but it seems all the programming isn't working. (I click on a button to open a form and nothing happens).

    I went into event and then clicked Debut and Compile, but that did not seem to work?

    I did split the database. Could you tell me what to do next?

    0 comments No comments
  4. Anonymous
    2012-04-05T17:54:03+00:00

    The IT guy decompiled the database with the following command!!!!

    C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE"  "C:/somepath/consumeroutcome.mdb" /decompile

    I was able to open it in 2003. I didn't get any errors coming up, but it seems all the programming isn't working. (I click on a button to open a form and nothing happens).

    I went into event and then clicked Debut and Compile, but that did not seem to work?

    I did split the database. Could you tell me what to do next?

    To clarify:  you're working remotely, right?  Otherwise I can't see how you're opening the database with Access 2003, since you said you had A2010 at home.  But working remotely, you can open the decompiled database in Access 2003.  Correct?

    When you open the database, are you holding the Shift key down to suppress any startup code?

    Now that you've split the database, you should be opening and working with the front-end, not the back-end.  Is that what you're doing?

    When you go into the VB Editor environment, when you click Tools -> References ..., what checked references do you see in the References dialog?  Are any references marked "MISSING"?

    Are you able to open the various VB modules and see that there is code in them?

    Is the Compile option on the Debug menu active at this point, or is it grayed out?  If it's active, when you click it does anything happen?

    0 comments No comments