none
Access deleted all vba code. RRS feed

  • Question

  • Hi,

    Like the title says. Access deleted all vba code from my db.

    How do I fix this?

    Thanks.

    Wednesday, September 28, 2016 7:48 PM

Answers

  • Too late now, but in future do what I do: at least once an hour I exit the program, Ctrl-C, Ctrl-V to create a copy. Cheap insurance.

    You could try a repair service such as EverythingAccess.


    -Tom. Microsoft Access MVP

    • Proposed as answer by David_JunFeng Monday, October 10, 2016 1:27 AM
    • Marked as answer by David_JunFeng Monday, October 10, 2016 1:27 AM
    Thursday, September 29, 2016 1:55 PM

All replies

  • The simplest way would be to restore the most recent backup.

    What you can try: run a Decompile on *a copy of* the current database. You have not compacted it yet, right?


    -Tom. Microsoft Access MVP

    Wednesday, September 28, 2016 8:49 PM
  • >>>Access deleted all vba code from my db.

    According to your description, do you have any operation to cause this issue happen? what version is Access? 

    It seems this database is corruption. I strongly suggest you read this link and follow the instructions given:

    http://allenbrowne.com/ser-47.html

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks for your understanding.
    Thursday, September 29, 2016 1:41 AM
  • The simplest way would be to restore the most recent backup.

    What you can try: run a Decompile on *a copy of* the current database. You have not compacted it yet, right?


    -Tom. Microsoft Access MVP

    Unfortunately, our backup only holds three versions och changes, which means there is no backup.

    The decompiling didn´t work, it says the database is in an inconsistent state and then makes a copy. I'm not sure if I compacted it after I did the latest changes.

    Do you know how to open an inconsistent db in sort of "safe mode"?

    Thursday, September 29, 2016 1:50 PM
  • I use 2016 version, but as I understand it this is nothing new.

    when creating a new db and trying to import the modules, it says there are already modules in the db with those names.

    Thanks

    Fabean

    Thursday, September 29, 2016 1:51 PM
  • Too late now, but in future do what I do: at least once an hour I exit the program, Ctrl-C, Ctrl-V to create a copy. Cheap insurance.

    You could try a repair service such as EverythingAccess.


    -Tom. Microsoft Access MVP

    • Proposed as answer by David_JunFeng Monday, October 10, 2016 1:27 AM
    • Marked as answer by David_JunFeng Monday, October 10, 2016 1:27 AM
    Thursday, September 29, 2016 1:55 PM
  • Check if you have system restore Previous Versions of the files in the current catalog. A way of restore the files.

    Greg

    Friday, September 30, 2016 5:44 PM
  • Thanks!

    However I don´t seem to have that tab(?)

    Fabean

    Saturday, October 1, 2016 6:23 AM
  • >>>However I don´t seem to have that tab(?)

    According to your description, Previous Versions is an incredibly useful feature built into Windows 7, which allows the OS to record and view earlier versions of files without a flux capacitor. 
    So this issue is not related to Access, I suggest that you could follow Tom van Stiphout's suggestion.

    Thanks for your understanding.
    Tuesday, October 4, 2016 5:28 AM