|
-
Jan 19th, 2008, 07:12 AM
#1
Thread Starter
New Member
moveNext and MovePrev problem
is this the right code for move next?
Code:
Dim Ssql As String
Set rs = New ADODB.Recordset
Ssql = "select * from StuName order by Fname"
rs.Open (sql), conn, adOpenStatic, adLockOptimistic
If Not rs.EOF Then
rs.MoveNext
If rs.EOF Then
rs.MovePrevious
End If
End If
-
Jan 19th, 2008, 07:32 AM
#2
Hyperactive Member
Re: moveNext and MovePrev problem
Code:
Dim Ssql As String
Set rs = New ADODB.Recordset
Ssql = "select * from StuName order by Fname"
rs.Open (Ssql), conn, adOpenStatic, adLockOptimistic
If Not (rs.EOF Or rs.BOF) Then ' ' checking any rowsets available
rs.movefirst 'moving to topfirst row
Do While Not rs.EOF ''loop all availbale rows
msgbox rs!fieldname 'your code
rs.MoveNext 'moving to next row
rs.Moveprevious 'moving to next row
Loop ''end loop
Endif
Wait for Senior's post because i am not sure you can catch my description. i am also new to vbsql.
DONT RUN EXECUTABLE FILES FROM UNKNOWN SOURCES.

-
Jan 19th, 2008, 07:39 AM
#3
Re: moveNext and MovePrev problem
Why not just take your entire recordset and display it in something like a Listview?
That way, you don't have to move through it, you can scroll through it.
-
Jan 19th, 2008, 07:48 AM
#4
Thread Starter
New Member
Re: moveNext and MovePrev problem
your code isn't working 
@Hack
is there no way you can use movenext or previous using textbox?
Last edited by VBnoobChild; Jan 19th, 2008 at 07:54 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|