Well, I would start by changing your SQL statement to order the records by the number 
you are presenting (100, 101, 102, etc).  Something like this:
 
sql="select * from leavepending order by ID" 
 
Replace the word "ID" with the field name of the the number.
 
Once that is done, your code should work because the records will come back in order 
by ID.  So it won't matter if you delete any records.  It will always move to the next 
record in the recordset.
 
Mark

peijanelaw <[EMAIL PROTECTED]> wrote:
hi everyone,

i need to move next record, in some case not in order... 
eg.100,101,103,106, with assumption that record 104,105 have been 
deleted... i have tried the following but fail, please help thanks...

Set rs=server.createobject("ADODB.Recordset")
sql="select * from leavepending"
rs.ActiveConnection = strconnect
rs.Source = Sql
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 3
rs.Open()

if request.form="" then
rs.movefirst
end if 

If request.form("combutton")="NEXT" Then
rs2.movenext
End If

If request.form("combutton")="BACK" Then
rs2.moveprevious
End If

<input type="text" name="leaveid" size="30" value="<% =rs2
("numid").value %>">

but base on my code,it can only move ONCE only,eg.100 move to 101, 
keep on 'Next' won't move to 103, just remain 101.... please help, i 
am really stuck, i can't find any referece on this.....thanks..




Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


                
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to