Hello,
I'm into DB access now.
I have a SELECT Query code here:
I want this function to be exclusively for DB access only.
So, I want to get the gathered recordset data out from this function.
What is the best way to do that?
I was thinking of return function but I don't know what to use for a Recordset.
I'm into DB access now.
I have a SELECT Query code here:
Code:
Public Sub DBSelectUpdateListTable()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT ActivityID FROM " & DB_UPDATE_LIST & " ORDER BY ActivityID")
While Not rs.EOF
rs.MoveFirst
GatherDataHere = rs![ActivityID]
rs.MoveNext
Wend
rs.Close
db.Close
End Sub
I want this function to be exclusively for DB access only.
So, I want to get the gathered recordset data out from this function.
What is the best way to do that?

I was thinking of return function but I don't know what to use for a Recordset.
