hola a todos elabore un form y le agrege el botton guardar y lo programe de la siguiente manera:
Código:
Código:
rivate Sub Command1_Click()
codigo = Val(Text3)
If codigo > 0 Then
bandera = False
With tabla
If .BOF = False And .EOF = False Then .MoveFirst
Do While Not .EOF
If codigo = !ci Then bandera = True
.MoveNext
Loop
If bandera = False Then
.AddNew
!nom = Text1
!apell = Text2
!ci = Text3
!protecc = Text4
!proyecn = Text5
!taller = Text6
!mate = Text7
!leng = Text8
!plan = Text9
.Update
MsgBox "Datos Almacenados", vbInformation, "AVISO"
Limpiar
Else
MsgBox "Este Cedula ya existe", vbInformation, "AVISO"
Limpiar
End If
End With
Else
MsgBox "Debe agregar una Cedula para iniciar", vbCritical, "CUIDADO"
Text1.SetFocus
End If
End Sub
trabaja bien sin error lo q quiero es como pero quiero saber como hago para q el boton se habilite cuando los campos esten llenos q si me falta un por llenar se mantenga desabilitado como cuando vamos a poner un key para un programa hasta q no llenas no se te habilita el boton siguiente