设置对Microsoft Access 12.0对象库的引用允许我们使用DCount测试表是否存在.
Public Function ifTableExists(tblName As String) As Boolean If DCount("[Name]","MSysObjects","[Name] = '" & tblName & "'") = 1 Then ifTableExists = True End If End Function