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

Trying to reach last record of a resultset

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I am trying to get an elseif then statement to execute when the status field is equal to "Production" or if it is the last record of the resultset. I can get it to execute for the status alone, but I haven't figured out how to get it to execute it if it the last record of the resultset.

I have tried RS.EOF but I doesn't work, I believe it is becasuse this if statement is inside of a do loop that executes until the end of the resultset. I also tried RS.Late but I gues that command doesn't really exist.

What else would indicate the last record of a resultset?

Do While Not RS.EOF
If RS(&quot;status&quot;) <> &quot;Production&quot; Then
Late = Late + 1
'Move to the next record of the
'resultset if status still doesn't
'equal Production increment late by 1
'again.
RSLate.MoveNext
ElseIf RS(&quot;status&quot;) = &quot;Production&quot; Or RS.Last Then
'More statements


exit do

end if

loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top