Dim db As Database , MySet As Recordset , myqs As QueryDef
Set db = CodeDb()
Set myqs = db.QueryDefs("QueryName")
myqs.ReturnsRecords = True
' Define the execute line for the SP
myqs.sql = "DECLARE @R int EXEC SPName select @R "
Set MySet = db.OpenRecordset("QueryName")
If not MySet.Eof then
your code...
end if
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.