
Private Sub Command1_Click()
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Combo3.Enabled = True
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Adodc1.Recordset.AddNew
End Sub
Private Sub Command2_Click()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Adodc1.Recordset.Update
End Sub
Private Sub Command3_Click()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Adodc1.Recordset.CancelUpdate
End Sub
Private Sub Command4_Click()
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
Combo3.Enabled = True
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
End Sub
Private Sub Command5_Click()
X = MsgBox("ESTAS SEGURO DE ELIMINAR ESTE REGISTRO", vbYesNo, "ALERTA DE ELIMINACIÓN")
If X = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveFirst
MsgBox ("REGISTRO ELIMINADO SATISFACTORIAMENTE")
Else
MsgBox ("NO HA OCURRIDO NINGUNA ELIMINACIÓN")
End If
End Sub
Private Sub Command6_Click()
Form5.Show vbModal
End Sub
Private Sub Command7_Click()
Form3.Show vbModal
Unload Me
End Sub
Private Sub Form_Load()
Combo1.AddItem "CASA": Combo1.AddItem "QUINTA": Combo1.AddItem "APARTAMENTO": Combo1.AddItem "RANCHO": Combo1.AddItem "OTRO"
Combo2.AddItem "PROPIA": Combo2.AddItem "ALQUILADA": Combo2.AddItem "COMPARTIDA"
Combo3.AddItem "SEMANAL": Combo3.AddItem "QUINCENAL": Combo3.AddItem "MENSUAL": Combo3.AddItem "DIARIO"
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
