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!

Loop through recordset

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi

I do the following to get my recordset:


get_rollups = "select transit_no from transits where sequence > " & intSqnce &_
&quot; and sequence <= &quot; & intBottom & &quot; and Rec_month = &quot; & RecMonth &_
&quot; and Rec_year = &quot; & RecYear & &quot; and Hi_level = &quot; & intLevel + 1

Set rs1 = dbtransits.execute(get_rollups)


Then I want to call another function and pass the value of transit_no from rs1 recordset.

How do I loop through rs1 to assign each transit_no to the variable and then pass that variable to the next function?

The logic is:

Do Until rs1.eof
param=rs1!Transit_No
call NextFunction()
rs1.movenext
Loop

What is the syntax?

Thanks
 
param=rs1!Transit_No
should be written like this
param=rs1(&quot;Transit_No&quot;) Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top