Private Sub BakupDatabase()
Dim tmp_filed As String
Dim backfile As String
CommonDialog1.DefaultExt = "*.MDB"
CommonDialog1.FileName = "*.mdb"
CommonDialog1.DialogTitle = "备份数据文件... "
CommonDialog1.CancelError = True
CommonDialog1.ShowOpen
If Err Then Exit Sub
'选择欲备份的数据库文件
tmp_filed = CommonDialog1.FileName
If tmp_filed = "" Then Exit Sub
If Dir(tmp_filed) = "" Then
MsgBox "文件:" & tmp_filed & " 没有找到数据库文件. 不可备份!", vbExclamation
Exit Sub
End If