I just converted an Access 97 database to Access 2003, for some reason when I get to the line:
If (rsSource("Tree_Num") <> rsUpdate("Tree_Num")) Then
rsUpdate.MoveNext
rsupdate.MoveNext works fine, but when it gets to the line:
Else
rsUpdate.MoveNext
rsSource.MoveNext
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
It skips over the command and does not do anything.
When it gets to the command:
Else
rsUpdate.MoveNext
rsSource.MoveNext
It skips over the rsSource.MoveNext command.
End If
If rsUpdate.EOF Then
rsUpdate.MoveFirst 'This is the line that it skips over, it does not go to the next rsUpdate record.
It looks like it cannot find the rsUpdate.EOF in order for the rsSource.MoveNext to happen.
thanks.
Basically what it does is it checks to see if :
It will move through the code:
If (rsSource("Tree_Num") <> rsUpdate("Tree_Num")) Then
rsUpdate.MoveNext
So it moves through
donnie91910
ASKER
No error. It just keeps running in a loop.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
donnie91910
ASKER
Added a line of code:
End If
If rsUpdate.EOF Then
rsSource.MoveNext 'Added line to increment through rsSource records.
rsUpdate.MoveFirst
This was good to have to check for EOF.
debug.print rsSource.absoluteposition, rsSource.eof
thanks.
Gary