G
Guest
Hi All,
I had the code to do this once, but can't locate it.
I want to open a recordset #1, then open a 2nd recordset that is dependent
on the first recordset.
Like the first one would be cust id, name, etc
and the 2nd would be opening a recordset like payroll, where it would get
data for the cust id in recordset 1.
The reason for this is to export certain lines to EXCEL to a template.
Dim rs As DAO.Recordset
Set rs = DBEngine(0)(0).OpenRecordset("MyTable")
Do While Not rs.EOF
'open a 2nd recordset here
'if it's something, then export the line to EXCEL
rs.MoveNext
Loop
rs.Close
I had the code to do this once, but can't locate it.
I want to open a recordset #1, then open a 2nd recordset that is dependent
on the first recordset.
Like the first one would be cust id, name, etc
and the 2nd would be opening a recordset like payroll, where it would get
data for the cust id in recordset 1.
The reason for this is to export certain lines to EXCEL to a template.
Dim rs As DAO.Recordset
Set rs = DBEngine(0)(0).OpenRecordset("MyTable")
Do While Not rs.EOF
'open a 2nd recordset here
'if it's something, then export the line to EXCEL
rs.MoveNext
Loop
rs.Close