标题: 如何用VBA判断是否存在数据表 [打印本页] 作者: rockfish1976 时间: 2011-9-7 14:00 标题: 如何用VBA判断是否存在数据表 想通过VBA代码判断是否存在某个数据表,如有则删除。如何实现呢?作者: todaynew 时间: 2011-9-7 14:18
sub deltb(tbname as string)
if DCount("name","MSysObjects","(Type=1 or Type=6) and Name='" & tbname & "'")>0 then
DoCmd.DeleteObject acTable, tbname
end if
end sub 作者: rockfish1976 时间: 2011-9-7 16:39
todaynew 发表于 2011-9-7 14:18
sub deltb(tbname as string)
if DCount("name","MSysObjects","(Type=1 or Type=6) and Name='" & tbname ...