Hi guys, I'm having difficulty with navigating a recordset, hopefully someone out there can point me in the right direction.
I have 4 links that will allow a user to view the First, Previous, Next, and Last record in a recordset,
When a button is clicked it reloads the page and send through the querystring a value of first, previous, next, or last.
I use these values in an If statement, as follows...
Code:
'Move to first, last, next or Previous record
IF moveMe = "first" THEN
Rs.MoveFirst
Location = 1
ELSEIF moveMe = "next" THEN
Rs.MoveNext
Location = Location + 1
ELSEIF moveMe = "prev" THEN
Rs.MovePrevious -1
Location = Location - 1
ELSEIF moveMe = "last" THEN
Rs.MoveLast
Location = Counter
END IF
Location is the name of a variable that (believe it or not) holds the exact location of the recordset.
In my adovbs.inc file I have set adOpenForwardOnly = 1
MoveNext, and Movefirst both work fine, but movePrevious and MoveLast have different errors, they are...
movePrevious => Wrong number of arguments or invalid property assignment: 'Rs.MovePrevious'
moveLast => Rowset does not support fetching backward.
Any help here would be much appreciated.
Cheers,
Blaise