I've no idea what is going on here, though I think I've had this problem before, only the "fix" I used then isn't working now because the problem seems to be compounding.
If anyone has encounted this strange thing before and has a solution, I would really appreciate knowing about it as this is driving me crazy and that RecordCount plays a key role in setting up formatting and such for the form.
TIA,
Gavin
BTW, 'RecordSet' should be the DAO 3.6 version of the reference, although ADO is also Checked, it is below the DAO in priority.
Code:
Private Sub DoStuff(RSP as RecordSet, ...)
Dim I as Integer
[green]' At this point watch on RSP.RecordCount shows it to be 18[/green]
RSP.MoveFirst
[green]' RSP.RecordCount is still 18[/green]
I = RSP.RecordCount
[green]' 18 is stored in I[/green]
While Not RSP.EOF And I < SomeMaxThing
[green]' Get a field or two from RSP[/green]
Blah = RSP!FieldA
Blah2 = RSP!FieldB
[green]' RSP.RecordCount is still 18[/green]
RSP.MoveNext
[green]' Suddenly, for no apparent reason, RSP.RecordCount is now 1[/green]
Wend
End Sub
If anyone has encounted this strange thing before and has a solution, I would really appreciate knowing about it as this is driving me crazy and that RecordCount plays a key role in setting up formatting and such for the form.
TIA,
Gavin
BTW, 'RecordSet' should be the DAO 3.6 version of the reference, although ADO is also Checked, it is below the DAO in priority.