30.04.2013 Views

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Text4<br />

Command1<br />

Command2<br />

Command3<br />

Nombre TxtCurProfe<br />

Text<br />

Nombre CmdGrabar<br />

Caption &Grabar<br />

Nombre CmdNuevo<br />

Caption &Nuevo<br />

Nombre CmdCerrar<br />

Caption &Cerrar<br />

Una vez establecidas las propiedades, proceda a ingresar<br />

el siguiente código:<br />

Private Sub Form_Load()<br />

CmdGrabar.Enabled = True<br />

CmdNuevo.Enabled = False<br />

End Sub<br />

Private Sub CmdGrabar_Click()<br />

Cn.Execute “Insert Into <strong>Curso</strong>(CurCodigo, CurNombre, ” & _<br />

“CurVacantes, CurProfe) Values ('” & TxtCurCodigo & _<br />

“',” & “'” & TxtCurNombre & “',” & _<br />

Val(TxtCurVacantes) & “,” & “'” & TxtCurProfe & “')”<br />

CmdGrabar.Enabled = False<br />

CmdNuevo.Enabled = True<br />

End Sub<br />

Pág. 336

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!