botones de anterior y último
Publicado por Lorena (1 intervención) el 08/02/2006 22:10:17
Tengo problemas con el codigo de anterior y último, aquí les pongo el error
Error '3219' en tiempo de ejecucion:
la operacion no esta permitida en este contexto
el codigo es el siguiente
Select Case Index
'....................... Irse al primer registro ........................
Case 0:
rs2.MoveFirst
Call refrescar
'....................... Irse al registro anterior ........................
Case 1:
rs2.MovePrevious
If rs2.BOF Then
msgbox"Primer registro"
Else
call refrescar
End If
'............................. Irse al siguiente registro ........................
Case 2:
rs2.MoveNext
If rs2.EOF = True Then
MsgBox "Último registro", vbInformation, ""
Else
Call refrescar
End If
'............................... Irse al ultimo registro ..........................
Case 3:
rs2.MoveLast
If rs2.EOF = True Then
MsgBox "Ultimo registro ", vbInformation, ""
Else
Call refrescar
End If
End Select
End Sub
Error '3219' en tiempo de ejecucion:
la operacion no esta permitida en este contexto
el codigo es el siguiente
Select Case Index
'....................... Irse al primer registro ........................
Case 0:
rs2.MoveFirst
Call refrescar
'....................... Irse al registro anterior ........................
Case 1:
rs2.MovePrevious
If rs2.BOF Then
msgbox"Primer registro"
Else
call refrescar
End If
'............................. Irse al siguiente registro ........................
Case 2:
rs2.MoveNext
If rs2.EOF = True Then
MsgBox "Último registro", vbInformation, ""
Else
Call refrescar
End If
'............................... Irse al ultimo registro ..........................
Case 3:
rs2.MoveLast
If rs2.EOF = True Then
MsgBox "Ultimo registro ", vbInformation, ""
Else
Call refrescar
End If
End Select
End Sub
Valora esta pregunta


0