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 
DoCmdSave
Bruce McCormick 
   
2 years ago
This might appear like a dumb question, but is behind what i was asking before regarding "Save" - Will DoCmd.Save save the ENTIRE DB, and if not, how might i accomplish that with VBA?

I want to be as absolutely certain that every little bit has been saved. It is probably wise that i also ask if there is either canned code aor something simple that will create a backup db to a specified location.

Thank you, Everyone, and MERRY CHRISTMAS!!!
Alex Hedley  @Reply  
            
2 years ago
Alex Hedley  @Reply  
            
2 years ago
Alex Hedley  @Reply  
            
2 years ago
Maybe something similar to

var app = GetApp();
app.DoCmd.RunCommand(AcCommand.acCmdCompileAndSaveAllModules);


AcCommand.acCmdSaveAllModules
Bruce McCormick OP  @Reply  
   
2 years ago
Many thanks!

It will take some studying, but i rather enjoy learning. Only issue with me is that when i do learn, it just doesn't stick around too long (in the event you also understand Star Trek references, and i am almost exclusively TOS, "Spock's Brain").
Alex Hedley  @Reply  
            
2 years ago
What are you actually wanting to save?
Bruce McCormick OP  @Reply  
   
2 years ago
Honestly i simply want to make sure the entire DB is saved, not a specific form nor other object. I had reviewed the DoCmd.Save page you referenced prior to pestering the good folks here, but it specifically stated that it saves the active object. That could mean one form, as opposed to everything that may have happened across a session. It is possible that my paranoia stems from Excel, as there Save saves everything and not saving can mean losing everything, whereas it would seem in Access much gets saved as one moves along.

Many thanks-
Alex Hedley  @Reply  
            
2 years ago
Is this only for you when you are developing the db, not for when you are using the db?
Bruce McCormick OP  @Reply  
   
2 years ago
Thank you Alex,
it would more be for when i am developing.

When in use there are sometimes multiple "daisy-chained" forms that build upon one another. Each of them when exited, whether to the next logical form or back to the previous form, has (i really like to think) a built in save, so i think i am pretty well protected there.

I just don't know specifics while i am developing, so every time i have multiple objects open in design view and am over coding in the VBE, i will click the Save in the VBE then before closing any of the forms save each of them and then when they are all closed i will hit "Ctrl-S" and sometimes even after that save a backup! I get the feeling i am going into serious overkill due to my lack of knowledge... :)

Thanks for hanging in here with me, i appreciate it-
Alex Hedley  @Reply  
            
2 years ago
So if you've developing the forms then you wouldn't be using code to save the WIP as your Form would be in Design View so you can't click any buttons
Unless I'm missing something

(You could call functions from the immediate window)
Bruce McCormick OP  @Reply  
   
2 years ago
No you probably are not, i probably am. Juggling a bit too much with this, my normal work, and an upcoming move (wish it was back to FL, but Virginia Beach might do for a while).

With the user experience: Am i safe to say when exiting (Quit), prior to the quit if a DoCmd.Save is run, if anything was not saved in the normal course of thing it will be saved then?

With development: If i do a Ctrl-S are there any aspects that won't save that i might have hanging open and not individually saved, and if there are, is there a "global" any-stuff-that-isn't-saved-will-be-saved command?

I think that sums everything up. Simple paranoia of not doing it right-

You know, some movers are real scum...
Alex Hedley  @Reply  
            
2 years ago
User experience is it only changes to the data that you're worried about losing?
Bruce McCormick OP  @Reply  
   
2 years ago
Frankly, paranoid.

I guess it all stems from those Lotus and early Excel days when one could close out what they were working on, or there could be an interruption of power, and lose anything that had been done in the meantime. Then was the time, hazy in memory, when MS decided to automatically implement xlsx as the default save. I had done a lot of work, just went ahead and saved it, closed out, and when i came back all the code was gone. Obviously i went back to the prior and figured out what was happening, but that gave me that punched-in-the-gut feeling. I have almost certainly over-labored this thread which wouldn't be the case if i had more experience working with Access. Best to let this go with my thanks to all, and if something happens i will simply swear a bunch but quietly so no one can hear me, fix it, and learn-

Many thanks,
-Bruce

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: 7/6/2026 5:57:09 AM. PLT: 0s