I created a Pass Through query in Access that returns a result set in the open event of a report. I believe the data is coming back correctly as it appears in my debug window but, now that i have the data i am not sure what to do with it. How do i get the data from my querydef to my report recordsource?
Private Sub Report_Open(Cancel As Integer)
Dim MyDb As DAO.Database, MyQry As QueryDef, MyRS As DAO.Recordset
Set MyDb = CurrentDb()
Set MyQry = MyDb.CreateQueryDef("")
MyQry.Connect = "ODBC;DSN=DSNName;DATABASE=DBName"
MyQry.SQL = "spApplicantFlow '05/01/2007', '04/30/2008'"
MyQry.ReturnsRecords = True
Set MyRS = MyQry.OpenRecordset()