You can write some VB code or Access VBA code to copy and paste the file to
a new name. Or simply comact it. Run it from the Timer event of an Access
form:
Function CompactDatabase(path As String, databaseName As String)
Dim temp As Integer
' Check if file exists
If CheckIfFileExists((path & "\" & databaseName)) Then
DBEngine.CompactDatabase (path & "\" & databaseName), (path &
\newname.mdb")
' Delete Original File
Kill ((path & "\" & databaseName))
Name (path & "\newname.mdb") As (path & "\" & databaseName)
End If
End Function
Function CheckIfFileExists(fileNameAndPath) As Boolean
Dim FileName As String
FileName = Dir(fileNameAndPath)
If Len(FileName) > 0 Then
CheckIfFileExists = True
Else
CheckIfFileExists = False
End If
End Function
Also, have a look at Total Access Agent:
http://www.fmsinc.com/Products/Agent/index.html
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
Hi There,
Is it possible to create an automatic backup to a database? If so, can
someone enlighten me on how to do it.
I am not a programmer so would really appreciate a 'spoon fed' response.
Thanks!
Angie