Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

(VERY URGENT)How to move to previous record using ADODB???

help me...
following program is not doing any action,
>>>>
Private Sub precmd_Click()
On Error Resume Next
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
MsgBox "First Record", vbInformation, "First Record"
Else
Call displayrecord
End If
End Sub


Private Sub delcmd_Click()
On Error Resume Next
If MsgBox("Are you sure you wan't to delete record", vbOKCancel + vbExclamation, "Deleting Record") = vbOK Then
rs.Delete
rs.MoveNext
If rs.EOF Then
rs.MoveLast
MsgBox "Last Record"
End If
Call displayrecord
End If
End Sub
>>>>>
why this problem??,i tried a lot...
help me.......

Comments

  • GideonOmegaGideonOmega Member Posts: 617
    [b][red]This message was edited by Moderator at 2004-8-5 4:28:19[/red][/b][hr]
    : help me...
    : following program is not doing any action,
    : >>>>
    : Private Sub precmd_Click()
    : On Error Resume Next
    : rs.MovePrevious
    : If rs.BOF Then
    : rs.MoveFirst
    : MsgBox "First Record", vbInformation, "First Record"
    : Else
    : Call displayrecord
    : End If
    : End Sub
    :
    :
    : Private Sub delcmd_Click()
    : On Error Resume Next
    : If MsgBox("Are you sure you wan't to delete record", vbOKCancel + vbExclamation, "Deleting Record") = vbOK Then
    : rs.Delete
    : rs.MoveNext
    : If rs.EOF Then
    : rs.MoveLast
    : MsgBox "Last Record"
    : End If
    : Call displayrecord
    : End If
    : End Sub
    : >>>>>
    : why this problem??,i tried a lot...
    : help me.......
    :
    :

    As you are deleting with the recordset don't forget rs.Update


    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]



Sign In or Register to comment.