Tugas 11

TUGAS 11

Private Sub cmdno_Click()

End

End Sub

 

Private Sub cmdyes_Click()

Form1.sho

End Sub

Private Sub cmdbaru_Click()

Data1.Recordset.addnew

End Sub

 

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtpstudi = “”

txttahun.Text = “”

txtnurut.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 = “”

txtjurusan.Text = “”

txtpstudi = “”

txttahun.Text = “”

txtnurut.Text = “”

 

End Sub

 

Private Sub cmdproses_Click()

Dim s As String

txttahun.Text = “20” &Left(txtnpm.Text, 2)

s = Mid(txtnpm.Text, 3, 1)

If s = “1” Then

txtjurusan.Text = “sisteminformasi”

txtpstudi = “strata satu”

txtbp.Text = “1950000”

ElseIf s = “2” Then

txtjurusan.Text = “menejemeninformatika”

txtpstudi = “diploma tiga”

txtbp.Text = “1650000”

ElseIf s = “3” Then

txtjurusan.Text = “tehnikinformatika”

txtpstudi = “diploma empat”

txtbp.Text = “1750000”

ElseIf s = “4” Then

txtjurusan.Text = “menejemen&kompakutansi”

txtpstudi = “diploma dua”

txtbp.Text = “1450000”

End If

txtnurut.Text = Right(txtnpm.Text, 3)

 

End Sub

 

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub form_activate()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtpstudi.Text = “”

txttahun.Text = “”

txtnurut = “”

txtbp.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