Screen.MousePointer = vbHourglass
Datos.Refresh
If codigo.txt <> "" Then
With Datos.Recordset
.FindFirst " codigo ='" + codigo.txt + "'"
If .NoMatch = True Then
Datos.Recordset.AddNew
Datos.Recordset("codigo" = codigo.txt
Datos.Recordset("nombre" = nombre.txt
Datos.Recordset("telefono" = telefono.txt
Datos.Recordset("celular" = celular.txt
Datos.Recordset("clase" = clase.txt
Datos.Recordset("direccion" = direccion.txt
Datos.Recordset.Update
Datos.Refresh
End If
.Edit
If nombre.txt <> "" Then
.Fields("nombre" = nombre.txt
End If
If telefono.txt <> "" Then
.Fields("telefono" = telefono.txt
End If
If celular.txt <> "" Then
.Fields("celular" = celular.txt
End If
If clase.txt <> "" Then
.Fields("clase" = clase.txt
End If
If direccion.txt <> "" Then
.Fields("direccion" = direccion.txt
End If
Datos.Refresh
End With
End If
nombre.txt = ""
clase.txt = ""
direccion.txt = ""
codigo.txt = ""
celular.txt = ""
telefono.txt = ""
codigo.Enabled = True
codigo.SetFocus
Screen.MousePointer = 0
End Sub

