I'm calling a sub that takes 3 parms - a DAO Recordset object, and two variants that have been set equal to .Bookmark property in a previous sub. The two variants are called StartPoint and StopPoint respectively. I clone the recordset object (rsc), and set rsc.Bookmark = StartPoint. This moves my pointer to the correct starting point in the recordset. I then want to loop through the records until I hit my StopPoint. To do this, I wrote this bit of code...
Compiler does not like the "Do..." line of code. Claims I have a type mismatch and highlights the "=" sign in the Do.. line. I've tried double and triple "=" signs for comparing, but always the same result: Compile Error - Type Mismatch. So, my question is two parts: What is causing the type mismatch, and is it possible to use .Bookmark property as a control in a loop?
Thanks.
Code:
Do Until vntStopPoint = rsc.Bookmark
some lines of code that manipulate a string
rsc.MoveNext
Loop
Thanks.