Button to backup

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!
 
R

Rod

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 <--
 
S

Stefan Hoffmann

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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top