I have the following code and I am stepping through it and monitoring a watch variable for rsx.EOF
but immediately after it executes the rsx.MoveLast line in the code, the watch variable stays at
rsx.EOF False
I would expect it to be True after executing this. Any suggestions why it isn't?
Thanks
This code was working fine for some time and all of a sudden it started to get hung up
because the Movelast stopped setting the table to EOF.
I closed the database for a few minutes and then no problems it worked fine but
after half a dozen times with no reoccurring incidents it reared its ugly head again.
any ideas how to trouble shoot this problem?
Thanks
but immediately after it executes the rsx.MoveLast line in the code, the watch variable stays at
rsx.EOF False
I would expect it to be True after executing this. Any suggestions why it isn't?
Thanks
Code:
strSql = "Select * from SameOrd_tbl order by License_PartNO"
Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)
strSql = "Select * from PC_Lic_Line_tbl order by License"
Set rsx = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)
If rs.RecordCount > 0 Then ' if this is an empty table then don't bother...
rs.MoveFirst ' Get first rsx record
If rsx.RecordCount > 0 Then ' if this is an empty table then don't bother...
Do While Not rs.EOF
rsx.MoveFirst ' Get first rs record
Do While Not rsx.EOF
If rs!License_PartNO = rsx!License Then
rs.Edit
rs!SystemType = rsx!SysType
rs.Update
[highlight #FCE94F] rsx.MoveLast[/highlight]
Else
rsx.MoveNext
End If
Loop
rs.MoveNext
Loop
End If
End If
rs.Close
rsx.Close
This code was working fine for some time and all of a sudden it started to get hung up
because the Movelast stopped setting the table to EOF.
I closed the database for a few minutes and then no problems it worked fine but
after half a dozen times with no reoccurring incidents it reared its ugly head again.
any ideas how to trouble shoot this problem?
Thanks