Visual Basic - problemas con update

Life is soft - evento anual de software empresarial
 
Vista:

problemas con update

Publicado por c.a.ch (2 intervenciones) el 09/12/2004 04:51:40
Buenas, estoy trabajando con data en una base de datos access, y al agregar o editar un registro me tira el famoso error 3426.

Aqui les pongo el codigo de los 3 botones:

Private Sub bNuevo_Click()
habilitarCajas
noNavegacion
desactivarBtn
Data1.Recordset.AddNew
End Sub

Private Sub bEditar_Click()
habilitarCajas
noNavegacion
If rut = \"\" Then
Dim m
m = MsgBox(\"No ha escrito el RUT\", vbInformation, \"Edicion\")
Else
desactivarBtn
Data1.Recordset.Edit
End If
End Sub

Private Sub bGuardar_Click()
Dim thecheck, m
If rut.Text = \"\" Or nombre.Text = \"\" Or apellido.Text = \"\" Or dia.Text = \"\" Or mes.Text = \"\" Or acno.Text = \"\" Or sexo.Text = \"\" Or fono.Text = \"\" Or direccion.Text = \"\" Or ciudad.Text = \"\" Or prevision.Text = \"\" Then
thecheck = 1
ElseIf IsNumeric(rut.Text) = False Or IsNumeric(fono.Text) = False Or IsNumeric(dia.Text) = False Or IsNumeric(acno.Text) = False Then
thecheck = 2
End If

If thecheck = 1 Then
m = MsgBox(\"Se han encontrado campos vacios\", vbInformation, \"Guardar\")
ElseIf thecheck = 2 Then
m = MsgBox(\"Ha llenado campos numericos con caracteres inapropiados\", vbInformation, \"Guardar\")
Else
Data1.Recordset.Update
Data1.Refresh
bGuardar.Enabled = False
m = MsgBox(\"Paciente guardado con exito\", vbInformation, \"Guardar\")
siNavegacion
noHabilitarCajas
activarBtn
thecheck = 0
End If
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:problemas con update

Publicado por c.a.ch (2 intervenciones) el 09/12/2004 06:26:04
Bah, olvidenlo, habia un par de campos mal enlazados =P
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar