Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / May 2006

Tip: Looking for answers? Try searching our database.

Automating Backup of Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neil - 30 May 2006 18:25 GMT
I want to be able to have a button on my database front end that will
automate the backing of my database.  I have tried to assign a macro to my
button that will run the backup command.  However upon clicking the button I
get the following message: The Command or Action 'Backup' isn't available now.

Is there a way to assign the backup procedure to a button on a form or on a
toolbar ?

Thanks inadvance for any help.

Neil.
Ron2006 - 30 May 2006 21:07 GMT
The macro backup command and the backupcommand off of the menu, backsup
the mdb that you are in (your front end) not the linked tables, (the
BE).

Whatever routine you end up deriving to use, you in essence must copy
the BE mdb file to someplace else to back it up.

The potential problem is if you are copying it, it could be in the
middle of an update process from another user, and your resulting copy,
may have problems and some corrupt data.

It is the BE that has to be copied and saved to another name in order
to backup your data.
Neil - 30 May 2006 22:32 GMT
Ron,

I can't use the backup command off the menu because I have hidden it and
replaced it with my own menu bar.  If I put the backup command on my menu bar
it does not display because I have hidden the main database window from the
user.  Hence my problem with automating the backup.  Any other suggestions.  
Thanks.

Neil.

> The macro backup command and the backupcommand off of the menu, backsup
> the mdb that you are in (your front end) not the linked tables, (the
[quoted text clipped - 9 lines]
> It is the BE that has to be copied and saved to another name in order
> to backup your data.
Ron2006 - 30 May 2006 23:06 GMT
What I am saying is that even if you could could put it there, it is
going to back up the FE and NOT the data.

Therefore that is not what you want.

You want to create a macro that executes code that COPIES the BE mdb.

That can be done in your module somewhere.

OR with a batch file that is executed exclusive of Access that does it.

Or in another mdb that is executed periodically that does the copy.

BUT

if not all users are out of the tables (or one is in the middle of an
update) there is the potential for corruption. of a record.
Eric Blitzer - 31 May 2006 14:07 GMT
Here is some code to copy the backend of your database.  Remember what  Neil
said:
"The potential problem is if you are copying it, it could be in the
middle of an update process from another user, and your resulting copy,
may have problems and some corrupt data. "

fso.copyfile "full file name of sorce db", _
"full destination name of target location"

You could put this behind a command button or in the On Exit event of your
main form.

> Ron,
>
[quoted text clipped - 19 lines]
> > It is the BE that has to be copied and saved to another name in order
> > to backup your data.
Neil - 31 May 2006 17:35 GMT
Thanks Ron & Eric

> Here is some code to copy the backend of your database.  Remember what  Neil
> said:
[quoted text clipped - 31 lines]
> > > It is the BE that has to be copied and saved to another name in order
> > > to backup your data.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.