Tugas 2

TUGAS 2

Private Sub cmdno_Click()

End

End Sub

 

Private Sub Cmdyes_Click()

Form1.Show

End Sub

Private Sub cmdbaru_Click()

Data1.Recordset.addnew

End Sub

 

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtprodi.Text = “”

txttm.Text = “”

txturut.Text = “”

 

End Sub

 

 

Private Sub cmdhapus_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtprodi.Text = “”

txttm.Text = “”

txturut.Text = “”

 

End Sub

 

Private Sub cmdproses_Click()

Dim J, P, S As String

S = Mid(txtnpm, 4, 2)

If S = “01” Then

J = “sistem informasi”

ElseIf S = “02” Then

J = “teknik informatika”

ElseIf S = “03” Then

J = “menejemen informatika”

ElseIf S = “04” Then

J = “komputer akutansi”

End If

txtjur = J

S = Mid(txtnpm, 3, 1)

If S = “1” Then

P = “strata satu”

ElseIf S = “2” Then

P = “diploma dua”

ElseIf S = “3” Then

P = “diploma tiga”

End If

txtprodi = P

txttm = “20” & Left(txtnpm, 2)

txturut = Right(txtnpm, 3)

 

End Sub

 

Private Sub Cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub form_activate()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtprodi.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s