Button to backup

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

I need to backup the database, Candidates, five days a week. I would like to
have a button to press which will backup Candidates to "J:\bak\Backup (Tue)",
"J:\bak\Backup (Wed)", etc., so it needs to determine the current day and
execute the backup.

Thanks MUCH!
 
I pasted the code and keep getting unexpected end or expected identifier
errors. All four Sub and Function lines are in red.

Stefan Hoffmann said:
hi Rod,
I need to backup the database, Candidates, five days a week. I would like to
have a button to press which will backup Candidates to "J:\bak\Backup (Tue)",
"J:\bak\Backup (Wed)", etc., so it needs to determine the current day and
execute the backup.
These methodes will help you:

Sub CopyDatabaseFile(DatabaseFileName, [OverwriteExistingFile],
[DisconnectAllUsers])
Member of Access.DoCmd

Sub MkDir(Path As String)
Member of VBA.FileSystem

Function Weekday(Date, [FirstDayOfWeek As VbDayOfWeek = vbSunday])
Member of VBA.DateTime

Function WeekdayName(Weekday As Long, [Abbreviate As Boolean = Falsch],
[FirstDayOfWeek As VbDayOfWeek = vbUseSystemDayOfWeek]) As String
Member of VBA.Strings
Returns localized weekday name

mfG
--> stefan <--
 
hi Rod,
I pasted the code and keep getting unexpected end or expected identifier
errors. All four Sub and Function lines are in red.
Of course, these are just the methods. You still need to do some
programming.

http://www.google.de/search?q=backup+database+access+vba

btw, you don't need CopyDatabaseFile. Use

Sub FileCopy(Source As String, Destination As String)
Member of VBA.FileSystem

Also, I think, it would be a good idea to look at the examples in the
online help...


mfG
--> stefan <--
 
Back
Top