Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2010
    Posts
    8

    Question Unanswered: Dissappearing VBA and modules

    Two years ago I set up a production and inventory database for a compnay using Access 2007 and Windows XP. It has been working just fine until a week ago when VBA code started disappearing from forms and now the modules are listed but result in a "...doesn't exist." message.

    I have been replacing the missing VBA from the forms, that has been working but the VBA continues to dissappear.

    They do have an anti-virus program and they will be having technicians checking their computers.

    Any other thoughts on what may be happening?

    Any thoughts how to "restore" the modules? I do have backups for most of them.

    Thank you

    Richard K

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Never mind. Just open up a new blank database and import all the objects from the old DB in all tabs. Check all your new forms for VBA code. If all right, delete (or rename) your old database, and name your new DB as your old one, and put it in the same place.

    Sam

  3. #3
    Join Date
    Nov 2010
    Posts
    8
    Sam;
    Thank you for your reply and suggestion. When I tried creating a new blank database and importing everything, I got multiple messages (one for each object) that there were name comflicts for the forms and macros. I tried again and started importing the forms and macros before any other objects; had the same message, even when the database was blank. Forms and macros (all objects) are named to indicate what purpose they serve, it seems very unlikely that they duplicate any reserved names or words.

    I have tried on two different computers; one with Windows XP and Access 2007 (the one the work was done on originally) and a newer one with Windows 7 and Access 2010, same result on both.

    Thank you in advance for any further suggestions.

    Richard

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Sam's guessing that your app is corrupted, and the advice he gave use is usually the first step to be tried if this is suspected. The first step because it's easy to do and, in a majority of the cases, it will work!

    The fact that it didn't, and the continued trouble you're having, really nails down the culprit as corruption. Allan Browne has a detailed paper on the complete recovery sequence here. It's what myself and many others suggest if the importing of everything into a blank file doesn't work:

    Microsoft Access tips: Standard recovery sequency

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Nov 2010
    Posts
    8
    Thank you, I tried to decompile but cannot find MSACCESS.exe. I am currently using Windows 7 and Access 2010. Office was installed using the MS defaults.

    One reference suggested in "C:\Program Files\Microsoft Office\Office14" but this directory dos not have any exe files displayed.

    Thank you again

    Richard

  6. #6
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    You can't find any .exe files because Windows default is to turn off the display of common extensions, including .exe, among others. You can undo this feature easily if you open the Windows Explorer. Click on Tools-->Folder Options-->View. Uncheck the checkbox saying "Hide extensions for known file types" and save the change. This change only applies for the folder you have selected.

    Sam

  7. #7
    Join Date
    Nov 2010
    Posts
    8
    Thank you. The problem is now resolved, I created a new file and imported data from the corrupt file and the other pieces from various backups.

    A sincere thank you for your time and explaining what the problem actually was.

    Richard

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad we could help!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Quote Originally Posted by Missinglinq View Post
    Glad we could help!

    Linq ;0)>
    Sentiment echoed.

    Sam

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •