Hello. I am having a problem looping through a recordset and having it update. As a matter of fact, only the first record in the recordset is being updated. I am certian it has to do with the way I am looping. Here is a snipit of my code:
rsMOE.Open "select * from MonthExecutionQ where EP_ID = " & Me.EP_ID & " and BLI is not null", cnn adOpenKeyset, adLockOptimistic, adCmdTableDirect
Do While Not rsMOE.EOF
rsBLI.Open "select * from BLI where BLI = '" & rsMOE!BLI & " ' ", cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect
rsBLI!JanSpend = rsMOE!SumOfJanSpend
rsBLI.Update
rsBLI.MoveNext
rsMOE.MoveNext
rsBLI.Close
Loop
What am I doing wrong?
rsMOE.Open "select * from MonthExecutionQ where EP_ID = " & Me.EP_ID & " and BLI is not null", cnn adOpenKeyset, adLockOptimistic, adCmdTableDirect
Do While Not rsMOE.EOF
rsBLI.Open "select * from BLI where BLI = '" & rsMOE!BLI & " ' ", cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect
rsBLI!JanSpend = rsMOE!SumOfJanSpend
rsBLI.Update
rsBLI.MoveNext
rsMOE.MoveNext
rsBLI.Close
Loop
What am I doing wrong?