Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/05/2013, 20:31
Avatar de elvaleehdj
elvaleehdj
 
Fecha de Ingreso: julio-2011
Mensajes: 33
Antigüedad: 12 años, 9 meses
Puntos: 0
Error al modificar un usuario en la base de datos

Hola gente como estan?

Llevo todo el día tratando de solucionar un problema que me tiene bastante loco...

Tengo una base de datos access 2007, pero cuando trato de modificar el usuario me tira el error:

"El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual."

Acá dejo mi modulo:

Código:
Sub Usuarios()
    With RsUsuarios
        If .State = 1 Then .Close
        .Open "select * from Usuarios", BASE, adOpenStatic, adLockPessimistic
    End With
End Sub
Y acá dejo mi codigo del botón "MODIFICAR":

Código:
Private Sub modf_Click()
If Text1.Text = "" Then MsgBox "Ingrese usuario", vbInformation, "ERROR": Text1.SetFocus: Exit Sub
If Len(Text1.Text) >= 13 Or Len(Text1.Text) <= 2 Then MsgBox "El usuario debe tener de 3 a 12 caracteres", vbInformation, "ERROR": Text1.SetFocus: Exit Sub
If Text2.Text = "" Then MsgBox "Ingrese la contraseña", vbInformation, "ERROR": Text2.SetFocus: Exit Sub
    With RsUsuarios
        .Requery
        .Find "Id='" & Text1.Text & "'"
        !Id = Text1.Text
        !pass = Text2.Text
        .UpdateBatch
        .Requery
    End With
End Sub