scouser
Registered User.
- Local time
- Today, 15:40
- Joined
- Nov 25, 2003
- Messages
- 767
I am getting an error when I attempt to back-up my DB
Do I need to install something from 'Tools' 'References' whilst viewing the module in order for it to work?
Used to work?
Cheers,
Phil.
Code:
Dim fso As FileSystemObject
Dim sSourcePath As String
Dim sSourceFile As String
Dim sBackupPath As String
Dim sBackupFile As String
sSourcePath = "C:\Documents and Settings\My Name\My Documents\Access\MyDatabase\DB UK\"
sSourceFile = "DB UK.mdb"
sBackupPath = "C:\Database\Backups\"
sBackupFile = "BackupDB_" & Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmmss") & ".mdb"
Set fso = New FileSystemObject
[B]fso.CopyFile sSourcePath & sSourceFile, sBackupPath & sBackupFile, True[/B]
Set fso = Nothing
Dim sWinZip As String
Dim sZipFile As String
Dim sZipFileName As String
Dim sFileToZip As String
sWinZip = "C:\Program Files\WinZip\WINZIP32.EXE" 'Location of the WinZip program
sZipFileName = Left(sBackupFile, InStr(1, sBackupFile, ".", vbTextCompare) - 1) & ".zip"
sZipFile = sBackupPath & sZipFileName
sFileToZip = sBackupPath & sBackupFile
Do I need to install something from 'Tools' 'References' whilst viewing the module in order for it to work?
Used to work?
Cheers,
Phil.