Boton Eliminar - Visual Basic

Sirve para Limpiar un Formulario similar a este


CODIGO = Trim(InputBox("ingrese codigo de rama"))
If CODIGO = Empty Then
Exit Sub
End If
Adodc1.Refresh
With Adodc1.Recordset
.Filter = ("codcientifico='" & CODIGO & "'")
resp = MsgBox("seguro que desea eliminar?", vbYesNo, "eliminar")
If resp = 6 Then
.Delete
Text1 = ""
Text2 = ""
End If
End With

Adodc1.Refresh

Publicar un comentario

3 Comentarios

  1. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  2. Este comentario ha sido eliminado por el autor.

    ResponderEliminar
  3. Se ve mejor con un msgbox:

    codigo = Trim(Text1)
    If codigo = Empty Then
    Exit Sub
    End If
    Adodc1.Refresh
    With Adodc1.Recordset
    .Filter = ("usuario='" & codigo & "'")
    resp = MsgBox("¿Seguro que desea Eliminar el Usuario?", vbCritical + vbYesNo, "Eliminar")
    If resp = 6 Then
    .Delete
    Text1 = ""
    Text2 = ""
    list1 = ""
    Text3 = ""
    Text1.SetFocus
    End If
    End With
    Adodc1.Refresh

    ResponderEliminar
Emoji
(y)
:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
x-)
(k)