Results 1 to 11 of 11
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    Save / Save as - Access database to particular destination

    Save or save as - access db to a particular location.

    It's probably a simple code but I couldn't find anything on it.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    filecopy currentdb.name, "c:\folder\newname.accdb"

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    how about can it be save because I want to save what was updated from the database ?

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    You're wanting to save a copy of the db as a backup? Not very clear to me what you mean.
    If so, I used a batch file run by another db and checked if no one was logged in. That info was in the user table. The reason for the second db was to use Task Scheduler and run the backups at night.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I meant to save like how an VBA can save an excel workbook to the destination it open it from ?

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    While the database is open, click on the File icon at the upper left to get to the backstage. You can 'save as' from there.
    As for doing this in VBA, offhand I would Google that, but I don't see the point. Access saves everything automatically anyway.

  7. #7
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I tried to google it but I couldn't find anything on it.
    I created a program VBA, that upload data to Access and do things, and I just want to save what is uploaded after the program completes.

  8. #8
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Access isn't like a Word document or any other similar object. When you enter, edit or delete data in Access, what saves the changes is you moving off of the record, or any action that causes a form to update, which includes invoking a mouse action to close the db. There is no need to save the records in the fashion that you seem to want to do. The only exception I can think of that might come into play is if you modify data and pull the plug on a computer that has no power interrupt fail safe. If we're still not understanding, it's because your responses are not very clear. Sorry.

    If we are on the right track, surely you can perform a test on a copy of your db.

  9. #9
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I believe I understand what you are saying. Access can save table, query, module, report and macro objects but not the db. It can only backup the db. However if you updated the db, it can save the changes if you quit or close the db (access).

    But how do you backup the db and how is a backup different than saving each of the mentioned objects separately or altogether ?

  10. #10
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Access can save table, query, module, report and macro objects but not the db
    Basically, that IS the db.
    It can only backup the db
    I think I and others are saying it can't back up itself.
    However if you updated the db, it can save the changes if you quit or close the db (access).
    Again, records would have already been saved before you quit or closed as previously described.
    But how do you backup the db
    Answer already given in #4. Use a batch file - .bat or command file (.cmd) Examples are easy to find. If you go to Windows Explorer (not Internet Explorer) and right click on a file and do a Save As, that's basically a backup, but a .bat file does it via code (sometimes it's just old DOS commands).

  11. #11
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Ok thank you !

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 02-03-2014, 03:06 AM
  2. Replies: 15
    Last Post: 01-28-2014, 12:20 PM
  3. Replies: 1
    Last Post: 01-18-2013, 12:32 AM
  4. Save an email in an Access database
    By CindyR19 in forum Programming
    Replies: 2
    Last Post: 09-01-2011, 05:25 PM
  5. Replies: 9
    Last Post: 01-20-2011, 02:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums