What I'm having trouble with is the syntax for setting up a RecordSet such that it's content is the output from a query (rather than explicitly specifying the SQL in a variable).
Thank you for the help. You're getting it -- and I'll use your suggestion as my "work around" if there isn't any way to accomplish what I asked about. I was hoping to be able to use the Query Editor to fine tune the query once it is in place. It's rather long and convoluted and that seemed less error-prone and easier to re-verify than making changes in my twisted SQL directly. Thanks again -- the question is still on the table ..
as my "work around" if there isn't any way to accomplish what I asked about.
I was hoping to be able to use the Query Editor to fine tune the query once
it is in place. It's rather long and convoluted and that seemed less
error-prone and easier to re-verify than making changes in my twisted SQL
directly. Thanks again -- the question is still on the table ...
You can simply open a (DAO) recordset using CurrentDb.OpenRecordset:
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("YourQueryName")
' ... do stuff with rs ...
rs.Close
Set rs = Nothing
Ask a Question
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.