473,473 Members | 1,723 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I make my Access DB automatically save a copy on Exit?

1 New Member
I have an MS Acess 2007 database that I want to automatically copy to an additional server location whenever I exit it. It's a problem to remember to always save a copy so I don't lose everything when the IT guys goof up the nightly backup (like today!).

I currently have a macro that closes all forms, etc. and then executes the Exit command. I don't find any action that lets me save the database in more than one location. Any help is appreciated.

Thanks,
Lynda
Apr 21 '11 #1
1 4894
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Once you have closed all open objects, you can use the FileCopy in VBA to make a copy of the database. An example is shown below:
Expand|Select|Wrap|Line Numbers
  1. FileCopy  "C:\Programs\RequirementManagementTool\RMT.mdb", _
  2.           "H:\BACKUP\RMT" & format(Date(),"yyyymmdd") & ".bak"
Apr 22 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
3
by: Christopher Koh | last post by:
how do you stop Access from saving any changed data in your tables and queries? like i just add or change data on the table/query tables,then click on X (exit)because i have no intention of saving...
2
by: John Thomas Smith | last post by:
I use Access 97, but have a database that was created in A2000 A computer at work has Access 2002 so should read the 2000 file Does Access 2002 allow you to save a file in the 97 format? If...
11
by: Danny J. Lesandrini | last post by:
Has anyone else noticed this? I searched group archives and found nothing, but it's really starting to irritate me big time. Here's the steps to reproduce the problem: Copy something to the...
3
by: puzzlecracker | last post by:
Given, class X { //..... private: auto_ptr<Y> y; };
3
by: GinnyP | last post by:
Hi, When my database opens I have it set up to run a bunch or queries, format, generate, and save output as excel files. Can I set this to run automatically at night? If yes how would I do this? ...
2
by: mscurto | last post by:
Is there a way to set up access to open and run a query in a particular database at a particular time each day? This would be run from a Windows 2000 desktop.
2
by: Simon Wigzell | last post by:
I have inherited a database driven website that comes with a table of image links. The images are scattered all of the internet and there are thousands of them. I would like to write an asp script...
6
by: VivDenham | last post by:
I have a Form, the fields of which I also use to copy and paste into a Report. However, each time I make design changes to the Form, I have to remember to copy and past the changes into the Report....
1
by: MichaelMelaku | last post by:
I am trying to save a txt file onto the client local drive (c:\Temp.txt) which will contain only xy coordinates generated by my web app. This txt file is to be consumed by another desktop app...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.