在vba函数中调用多个查询结果

时间:2013-07-10 08:54:50

标签: sql vba access-vba

我一直在为MS Access工资单工作..如何在VBA函数中调用已在Access中创建的查询?

Public Function InsertAndUpdate()
    //i want my queries here for conditioning
End Function

1 个答案:

答案 0 :(得分:0)

Dim dbs As DAO.Database
Dim rs As DAO.Recordset

Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Your_Query_Name")