create backup of database
I have a script in my program that makes a back up of the existing db.
Code:
'make a back up of the existing db and rename it.
If Dir("C:\WestfieldInsurance\old_Westfield.mdb", vbNormal) = "" Then
fso.CopyFile App.Path & "\" & "Westfield.mdb", "C:\WestfieldInsurance\old_Westfield.mdb", True
Else
'MsgBox ("file exist")
End If
I want to change this script and was thinking of a way to add a date and time to the db name so if I need to restore a previous db from certian date or time, I could. I hope that makes sense.
Re: create backup of database
Try using something like
Code:
App.Path & "\" & "Westfield.mdb", "C:\WestfieldInsurance\old_Westfield" & format(now, "mmddyyyy") & ".mdb"