I have started on the wrong end of the spectrum I think. i am very familiar with ADO, SQL Server and .NET; however, I am now having to write an Access application and the smallest syntax issues are driving me batty.
I have a query that gives me a distinct list of user IDs. I want to create a FOR loop to loop through this list of user ids and pass the current one to another query so that i can email the results to someone.
The problem: I can't figure out how I'm supposed to assign the recordset's datasource to the first query.
Here's what I have:
dim rs as new recordset
rs.datasource = ???
rs.movefirst
for intcount=0 to rs.recordcount-1
'do some work
rs.movenext
next
Any help is greatly appreciated.
Thanks,
CHIX001
I have a query that gives me a distinct list of user IDs. I want to create a FOR loop to loop through this list of user ids and pass the current one to another query so that i can email the results to someone.
The problem: I can't figure out how I'm supposed to assign the recordset's datasource to the first query.
Here's what I have:
dim rs as new recordset
rs.datasource = ???
rs.movefirst
for intcount=0 to rs.recordcount-1
'do some work
rs.movenext
next
Any help is greatly appreciated.
Thanks,
CHIX001