PDA

Click to See Complete Forum and Search --> : movenext/moveprevious


iissa
Jan 24th, 2001, 10:05 AM
I am trying to create a program that will move through the record sets an access data base.
I have two buttons next, and previous.
They do move through the record sets
but
if you are on the first record set,
and press previous i get the error
and if you are on the last record set and press next i get the error.
i am currently using the movenext and moveprevious methods
is there a way of finding out if a record (+ or -) exist before actually moving to the next record.
and if there are no records in front or behind then it will give a message, saying that there are no records
any suggestions

Jan 24th, 2001, 04:26 PM
When going forward throught your recordset you need to test for end of file if rs.eof then rs.movelast and when they hit the previous button test for beginning of file ie if rs.bof then rs.movefirst
see how that goes