Function fExistTable(strTableName As String) As Integer
Dim db As Database
Dim i As Integer
Set db = DBEngine.OpenDatabase(Application.CurrentProject.Path & "\数据库名", False, False, "MS Access;pWD=密码")
fExistTable = False
db.TableDefs.Refresh
For i = 0 To db.TableDefs.Count - 1
If strTableName = db.TableDefs(i).Name Then
fExistTable = True
Exit For
End If
Next i
Set db = Nothing
End Function