Best VB method to cycle through records in a table

H

HCS

Hello,

I know a number of methods to go through the data within a table using VB.
What is the general feeling as to which is the best way. is it using
querydefs?

Cheers
 
D

Douglas J. Steele

You should be using a Recordset. Whether you use a string containing the SQL
or a querydef as the basis for the recordset shouldn't really matter that
much.
 
J

John Vinson

Hello,

I know a number of methods to go through the data within a table using VB.
What is the general feeling as to which is the best way. is it using
querydefs?

The best way is to not "cycle through records in a table" at all if
you can avoid it; running an action Query will usually be more
efficient than bringing up each record and (say) editing it.

If you do need to step through records, just create a Table type
Recordset (or a Snapshot if you want read-only access).

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top