Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图从 VB 调用 Access 中的查询,但遇到了一些问题。这是代码:
Dim myQuery As QueryDefs myQuery("2012Patient_q").Execute
但这不起作用。我尝试用谷歌搜索,但无济于事。我在这里想念什么?
谢谢
代码可能应该是这样的:
Dim myQuery As QueryDef ' no "s" Set myQuery = CurrentDB.QueryDefs("2012Patient_q") myQuery.Execute
或者,简单地说,没有任何中间变量:
CurrentDB.QueryDefs("2012Patient_q").Execute