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("status" <> "Production" 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("status" = "Production" Or RS.Last Then
'More statements
exit do
end if
loop
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("status" <> "Production" 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("status" = "Production" Or RS.Last Then
'More statements
exit do
end if
loop