Private Sub Quit_And_Save_Click()
Dim objFSO
Dim sSourceFolder
Dim sBackupFolder
Dim sDBFile
Const OVER_WRITE_FILES = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
sSourceFolder = "S:\File"
sBackupFolder = "S:\File\Backup\"
sDBFile = "O2S.accdb"
'Copy the file as long as the file can be found
If objFSO.FileExists(sSourceFolder & "\" & sDBFile) Then
objFSO.CopyFile sSourceFolder & "\" & sDBFile, sBackupFolder & "\" & sDBFile, OVER_WRITE_FILES
End If
Set objFSO = Nothing
DoCmd.Quit acPrompt
End Sub