deag30 de Agosto del 2004
PreguntaMe gustaria que me pudieran ayudar con el error 3020 ya que me marca que me falta un edit o un addnew me podrian ayudar porfavor ya que me urje porque es de un programa para examen este es mi codigo en donde me marca el error
Private Sub mnuGuardar_Click()
If Edito = False Then
Datnum.Recordset("NumEmpleado") = Int(NumEmpleado.Text)
Else
resp = MsgBox("Esta Seguro de que Desea Actualizarlo", vbYesNo)
If resp = "vbNo" Then
GoTo saliR
Else
Datnum.Recordset.Edit
End If
End If
Datnum.Recordset("Nombre") = Nombre.Text
Datnum.Recordset("Fecha") = Fecha.Text
Datnum.Recordset("LugarNacimiento") = LugarNacimiento.Text
Datnum.Recordset("Sexo") = Sexo.Text
Datnum.Recordset("Estado") = Estado.Text
Datnum.Recordset("Curp") = CURP.Text
Datnum.Recordset("IMSS") = IMSS.Text
Datnum.Recordset("Direccion") = Direccion.Text
Datnum.Recordset("Municipio") = Municipio.Text
Datnum.Recordset("Telefono") = Telefono.Text
Datnum.Recordset("Codigo") = Codigo.Text
Datnum.Recordset("Fechaing") = Fechaing.Text
Datnum.Recordset("Fechasal") = Fechasal.Text
Datnum.Recordset("Comentario") = Comentario.Text
MsgBox "Se Actualizó Base de Datos", vbInformation, "Actualizacion de Datos"
checaesto False, False
saliR:
End Sub
y esta es la funcion que manda a llamar con el checaesto
Public Sub checaesto(arg1 As Boolean, arg2 As Boolean)
' Arg1 limpia controles de Captura
' Arg2 habilita controles de Captura
If arg1 Then
NumEmpleado.Text = ""
Nombre.Text = ""
Fecha.Text = ""
LugarNacimiento.Text = ""
Sexo.Text = ""
Estado.Text = ""
CURP.Text = ""
IMSS.Text = ""
Direccion.Text = ""
Municipio.Text = ""
Telefono.Text = ""
Codigo.Text = ""
Fechaing.Text = ""
Fechasal.Text = ""
Comentario.Text = ""
End If
If arg2 Then
If Edito = False Then
NumEmpleado.Enabled = True
End If
Nombre.Enabled = True
Fecha.Enabled = True
LugarNacimiento.Enabled = True
Sexo.Enabled = True
Estado.Enabled = True
CURP.Enabled = True
IMSS.Enabled = True
Direccion.Enabled = True
Municipio.Enabled = True
Telefono.Enabled = True
Codigo.Enabled = True
Fechaing.Enabled = True
Fechasal.Enabled = True
Comentario.Enabled = True
Else
NumEmpleado.Enabled = False
Nombre.Enabled = False
Fecha.Enabled = False
LugarNacimiento.Enabled = False
Sexo.Enabled = False
Estado.Enabled = False
CURP.Enabled = False
IMSS.Enabled = False
Direccion.Enabled = False
Municipio.Enabled = False
Telefono.Enabled = False
Codigo.Enabled = False
Fechaing.Enabled = False
Fechasal.Enabled = False
Comentario.Enabled = False
End If
End Sub
espero que me puedan ayudar de antemano muchas gracias
Private Sub mnuGuardar_Click()
If Edito = False Then
Datnum.Recordset("NumEmpleado") = Int(NumEmpleado.Text)
Else
resp = MsgBox("Esta Seguro de que Desea Actualizarlo", vbYesNo)
If resp = "vbNo" Then
GoTo saliR
Else
Datnum.Recordset.Edit
End If
End If
Datnum.Recordset("Nombre") = Nombre.Text
Datnum.Recordset("Fecha") = Fecha.Text
Datnum.Recordset("LugarNacimiento") = LugarNacimiento.Text
Datnum.Recordset("Sexo") = Sexo.Text
Datnum.Recordset("Estado") = Estado.Text
Datnum.Recordset("Curp") = CURP.Text
Datnum.Recordset("IMSS") = IMSS.Text
Datnum.Recordset("Direccion") = Direccion.Text
Datnum.Recordset("Municipio") = Municipio.Text
Datnum.Recordset("Telefono") = Telefono.Text
Datnum.Recordset("Codigo") = Codigo.Text
Datnum.Recordset("Fechaing") = Fechaing.Text
Datnum.Recordset("Fechasal") = Fechasal.Text
Datnum.Recordset("Comentario") = Comentario.Text
MsgBox "Se Actualizó Base de Datos", vbInformation, "Actualizacion de Datos"
checaesto False, False
saliR:
End Sub
y esta es la funcion que manda a llamar con el checaesto
Public Sub checaesto(arg1 As Boolean, arg2 As Boolean)
' Arg1 limpia controles de Captura
' Arg2 habilita controles de Captura
If arg1 Then
NumEmpleado.Text = ""
Nombre.Text = ""
Fecha.Text = ""
LugarNacimiento.Text = ""
Sexo.Text = ""
Estado.Text = ""
CURP.Text = ""
IMSS.Text = ""
Direccion.Text = ""
Municipio.Text = ""
Telefono.Text = ""
Codigo.Text = ""
Fechaing.Text = ""
Fechasal.Text = ""
Comentario.Text = ""
End If
If arg2 Then
If Edito = False Then
NumEmpleado.Enabled = True
End If
Nombre.Enabled = True
Fecha.Enabled = True
LugarNacimiento.Enabled = True
Sexo.Enabled = True
Estado.Enabled = True
CURP.Enabled = True
IMSS.Enabled = True
Direccion.Enabled = True
Municipio.Enabled = True
Telefono.Enabled = True
Codigo.Enabled = True
Fechaing.Enabled = True
Fechasal.Enabled = True
Comentario.Enabled = True
Else
NumEmpleado.Enabled = False
Nombre.Enabled = False
Fecha.Enabled = False
LugarNacimiento.Enabled = False
Sexo.Enabled = False
Estado.Enabled = False
CURP.Enabled = False
IMSS.Enabled = False
Direccion.Enabled = False
Municipio.Enabled = False
Telefono.Enabled = False
Codigo.Enabled = False
Fechaing.Enabled = False
Fechasal.Enabled = False
Comentario.Enabled = False
End If
End Sub
espero que me puedan ayudar de antemano muchas gracias
