如何检查表的存在与否为VB宏的MS Access? [英] how to check if table is exists or not in ms access for vb macros?
本文介绍了如何检查表的存在与否为VB宏的MS Access?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
检查是否访问表存在
我是新来的VBA宏。任何主意,检查表,如果它存在与否? 我检查与previous岗位和想法,但没有得到明确的解决方案这一点。请提供你的想法。
i am new to vba macros. Any idea to check the table if it is exists or not? I check with previous post and idea, but not got clear solution for this. Please provide your idea.
在此先感谢朋友。
推荐答案
最后,我搜索,得到的结果,
Finally i search and got the result,
我用这个功能,
Public Function ifTableExists(tblName As String) As Boolean
ifTableExists = False
If DCount("[Name]", "MSysObjects", "[Name] = '" & tblName & "'") = 1 Then
ifTableExists = True
End If
End Function
我也验证了previous后,但没有得到任何正确的答案。这是为我工作一个伟大的。谢谢你们的帮助和支持。
I also verified previous post but not got any correct answer. This is worked for me a great. thanks guys for your help and support.
有关这一块,有选择的Microsoft Access 12.0对象库
。这是在菜单栏上的引用
工具
。
For this one, have to choose the Microsoft Access 12.0 Object Library
. It is in the references
in Menu Bar Tools
.
这篇关于如何检查表的存在与否为VB宏的MS Access?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文