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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For each...Next statement 1

Status
Not open for further replies.

medium

MIS
Joined
Aug 28, 2002
Messages
30
Location
US
Does anyone know if the For Each...Next statement can be used on the records that are in a query?

If so, how would one facillitate this with code?

Thanks in advance. :-)
 
Hi!

If you open a query in code (I assume using a recordset) then it is most common to use a Do loop.

rst.MoveFirst
Do Until rst.EOF = True
Do your stuff
rst.MoveNext
Loop

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top