Function CreateNormalDB(strPathName As String) As Boolean
On Error GoTo Exit_ERR
Dim wrkDefault As Workspace
Dim NewDB As Database
CreateNormalDB = False
Set wrkDefault = DBEngine.Workspaces(0)
If Dir(strPathName) <> "" Then Kill strPathName
Set NewDB = wrkDefault.CreateDatabase(strPathName, dbLangGeneral)
NewDB.Close
Set NewDB = Nothing
CreateNormalDB = True
Exit Function
ww w.iTbulo.co5nC2M
Exit_ERR:
MsgBox "備份失敗!" & vbCrLf & vbCrLf & Err.Description, vbExclamation
Exit Function
End Functionww w.iTbulo.co5nC2M
'調用時只需提供路徑及文件名即可,此函數為備份數據模塊的一部份