Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i get records into an array

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how do iterate through records in a table?
in products table, i want to place all prices into an array, but i don't know how to build the loop to refer to the records?
 
...without using ADO that is.
trying to do this in a form's code...
 
If you want to iterate through a table using DAO
you must open the data source then loop through the fields eg
dim db as dao.database
dim rs as dao.recordset

set db = currentdb
set rs = db.openrecordset("[Enter either a sql statement or the table name for all fields]")

with rs
.movefirst
while not .eof
*** enter code
wend
end with
set rs = nothing
set db = nothing

I hope this is helpful


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top