更新时间:2023-12-01 08:20:46
设置对Microsoft Access 12.0对象库的引用可以使我们使用DCount测试表是否存在.
Setting a reference to the Microsoft Access 12.0 Object Library allows us to test if a table exists using DCount.
Public Function ifTableExists(tblName As String) As Boolean
If DCount("[Name]", "MSysObjects", "[Name] = '" & tblName & "'") = 1 Then
ifTableExists = True
End If
End Function