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 Updater    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
ACCDE file
Christopher Godfrey 
     
2 years ago
Is there a way for VBA to save my developer copy as an accde file using a click event?  I want to be able to do my development work, then click a button to save my file as an accde file and then distribute the accde file to my users.
Adam Schwanz  @Reply  
           
2 years ago
Seems like a complex way to save two clicks :P.

I didn't test it but here's an example from ChatGPT that looks like it should work. Or is at least a starting point for you.
Sub SaveAsACCDE()
    Dim dbPath As String
    Dim accdePath As String
    
    ' Get the path of the current database
    dbPath = CurrentDb.Name
    
    ' Generate the path for the ACCDE file
    ' Replace .accdb with .accde in the path
    accdePath = Replace(dbPath, ".accdb", ".accde")
    
    ' Check if the ACCDE file already exists and delete it
    If Dir(accdePath) <> "" Then
        Kill accdePath
    End If
    
    ' Save the database as an ACCDE file
    Application.SaveAsText acForm, "FormName", "C:\Temp\FormName.txt"
    Application.SaveAsText acReport, "ReportName", "C:\Temp\ReportName.txt"
    
    ' Create the ACCDE file
    Application.SaveAs accdePath, acFileType.accde
    
    MsgBox "Database saved as ACCDE file at: " & accdePath
End Sub
Adam Schwanz  @Reply  
           
2 years ago
After looking a little deeper, this is probably simpler to do with a batch file in the command line. The other solutions I found involved sendkeys or creating a new temporary database and making that the ACCDE.
Christopher Godfrey OP  @Reply  
     
2 years ago
Yes, i received the same code from ChatGPT and a debug compile made me change the "SaveAs" because Access doesn't use it.  ChatGPT changed that to the following;   SysCmd acSysCmdMakeMDEFile, dbPath, accdePath

Another debug compile said that was an illegal function call.  Then chatgpt recommended a macro from another database, and by that time, it wasn't worth the effort.
Kevin Yip  @Reply  
     
2 years ago
The code pictured below should work (I tested, and it worked), provided that (1) this code is run from another database, and (2) you declare a new application instance as shown.  Also, the correct option is acSysCmdCompile, not acSysCmdMakeMDEFile as ChatGPT suggested.  The latter saves to an MDE file that is only supported in old Access MDB databases.

ChatGPT can be hit or miss.  If it misses, it may slow you down instead of helping you speed up your work.  The mini-stock market crash last month was partly due to a mini-AI bubble burst.  That was not unlike the dot com burst in the early 2000s.  But the ambitions of dot com eventually came to pass -- and so will the ambitions of AI.  Sometimes it just takes longer for a tech to succeed.
Kevin Yip  @Reply  
     
2 years ago

Christopher Godfrey OP  @Reply  
     
2 years ago
Thank you, Kevin. I will give it a try.

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

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: 4/10/2026 5:27:31 AM. PLT: 0s