Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdproses_Click()
Dim n, jurusan, pstudi, bp As String
Texttahun.Text = “20” & Left(Textnpm.Text, 2)
n = Mid(Textnpm.Text, 3, 1)
If n = “1” Then
jurusan = “sistem informasi”
ElseIf n = “2” Then
jurusan = “tehnik informatika”
ElseIf n = “3” Then
jurusan = “manajemen informasi”
ElseIf n = “4” Then
jurusan = “manajemen & komputer akuntansi”
End If
n = Mid(Textnpm.Text, 4, 2)
If n = “01” Then
pstudi = “strata satu”
ElseIf n = “02” Then
pstudi = “diploma empat”
ElseIf n = “03” Then
pstudi = “diploma tiga”
ElseIf n = “04” Then
pstudi = “diploma dua”
End If
textjurusan.Text = jurusan
textpstudi.Text = pstudi
Textnurut.Text = Right(Textnpm.Text, 3)
End Sub
Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub
Private Sub Command2_Click()
Data1.Recordset.Update
End Sub
Private Sub Command3_Click()
Data1.Recordset.Delete
End Sub
Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub