scroll through records

L

lee

hi all,

can someone post the script that will scroll through all
the records in a database table?

do i need to define the db and recordset as well? ie:

dim db as database
dim rs as recordset

set db as currentdb()

what else do i need to do?

once i can do this, maybe using .EOF, i can get on with
the other calculations i need to do to them!

many thanks,
lee.
 
D

Dan Artuso

Hi,
Dim db As Database
Dim rs As DAO.Recordset

Set db = CurrentDb()
Set rs = db.OpenRecorset("yourTable")
Do While Not rs.EOF
'code here
rs.MoveNext
Loop

Set rs = Nothing
Set db = Nothing

Look up OpenRecorset in Help. THere are other optional
arguments that might suit your needs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top