代码是。。。。谁的!(反正不是我写的)
vBA中如何判断某个表是否存在
Public Function isTable(strTableName As String) As Boolean
Dim tbl As DAO.TableDef
isTable = False
For Each tbl In CurrentDb.TableDefs
If tbl.Name = strTableName Then ’(strTableName可改为你要查询的表名)
‘加入如果存在的事件
isTable = True
Exit Function
End If
Next
End Function