Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
VBA Codes and Modules Gone
Chris Lopez 
     
8 months ago
Good Morning,

So I have a problem. This morning, when I opened my DB to work in it, it froze up and acted all weird. I was unable to close Access. I had to restart my PC The DB opens and works fine now, BUT.... now all my VBA codes and modules are missing, it seems just the VBA codes are missing, everything else appears to be there. Even the most current backup has the issue. I tried compact and repair already. I restated my PC again and the same issue. Are all my VBA codes just gone, or is there a way to get them back?
Donald Blackwell  @Reply  
       
8 months ago
Chris This happened to me a week or two ago... Only thing I could do was try to copy the code back in but it kept happening so I created a new db, copied all the objects back in (forms, queries, reports, tables) and then copy all the code back in I could from a previous back up and recreate the rest.

Then after that, be ever vigilant with backups, because it kept doing it. I had to Rollback Access to get it to stop. Something just kept corrupting the DB.

If you figure anything else out, let me know please, so I can turn updates back on, lol.
Alex Hedley  @Reply  
           
8 months ago
Please start using VCS / GitHub
One for backups and two as it's easier to see and search for your code
Raymond Spornhauer  @Reply  
          
8 months ago
Chris

I don't use VCS or GitHub.

When working with Access... you should have 2 files.  The Front End File and the Back End File.

You should always have backup copies of both of these files.

Before I make any changes to the Front End File, I change the name to add the date.  Then make the changes.  After I make the changes I make a backup of the updated version.  Now I have the last working version, my updated version, and a backup of my updated version.  (my previous versions had backups as well)

I typically don't need to make too many changes to my back-end, but I do this same process when making changes.

Besides making changes, I typically will make backups of the back-end... once/week.

==============================================================

If I have a problem with my Front-End file... I can restore it with the backup without losing any of the data.

I've not had any problems with my Back-End files, but if I did... I would only lose data from the last backup.

-Raymond
Chris Lopez OP  @Reply  
     
8 months ago
Sorry to keep bothering,

Access crashed on me, and I lost all the VBA Codes and modules. I can't seem to get them back; I have to re-code everything. I attempted to recode the VBA and revise some of the forms. Now I can't save the DB. I click save, then close, I get a pop-up to save, I click yes, but it doesn't save. When I click close, it does it again.
I tried to copy everything to a new DB, but I get an error "Name conflicts with existing module, project, or object library", and "the Microsoft Access database engine could not find the object" referring to the form I'm trying to copy to a new DB.

Any suggestions? other than building the DB from scratch, which seems to be the only thing I'm able to do.
I was hoping that if I repaired and reinstalled office it would fix the issue, but no luck.
Alex Hedley  @Reply  
           
8 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/16/2026 6:41:23 PM. PLT: 0s