This is the process of my code
sql1 = select employeeID from employees where dept = 34
Set recordset1 = workspace.OpenRecordset(Sql1,dbOpendynamic)
recordset1.Movefirst
Do while not recordset.BOF and Not recordset.EOF
call processInfo
recordset1.MoveNext ====>>>this is where I get =========================>>>error saying cursor not valid
Loop
Public Function ProcessInfo
sql2 = select * from infotable where employeeId = 1234
recordset2 = workspace.openrecordset(sql2,dbopendynamic)
recordset2.MoveFirst
Do while not bof and not eof
calculate totals
recordset2.MoveNext
Loop
sql3 = insert into temporary table values(totals)
execute
End Function
sql1 = select employeeID from employees where dept = 34
Set recordset1 = workspace.OpenRecordset(Sql1,dbOpendynamic)
recordset1.Movefirst
Do while not recordset.BOF and Not recordset.EOF
call processInfo
recordset1.MoveNext ====>>>this is where I get =========================>>>error saying cursor not valid
Loop
Public Function ProcessInfo
sql2 = select * from infotable where employeeId = 1234
recordset2 = workspace.openrecordset(sql2,dbopendynamic)
recordset2.MoveFirst
Do while not bof and not eof
calculate totals
recordset2.MoveNext
Loop
sql3 = insert into temporary table values(totals)
execute
End Function