Pengisian Kartu Hasil Studi ( KHS )

B6

Private Sub Command2_Click()
With Data1.Recordset
.Edit
.Fields!am = am.Caption
.Fields!HM = Text3.Text
.Fields!kam = kam.Caption
.Update
End With
DBGrid1.Refresh
End Sub

Private Sub Command3_Click()
Form9.Show
Form6.Hide
End Sub

Private Sub LANJUT_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Kode.Caption = “”
am.Caption = “”
kam.Caption = “”
Nama.Caption = “”
kuliah.Caption = “”
End Sub

Private Sub Selesai_Click()
Form6.Hide
Form8.Show
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim Cari As String
Cari = “NPM= ‘” & Text1.Text & ” ‘ And KD_MK = ‘” & Text2.Text & “‘”
With Data1.Recordset
.FindFirst Cari
If .NoMatch Then
MsgBox “Data yang dicari tidak ada”, vbInformation + vbOKOnly, “Perhatian”
Else
Text1.Text = .Fields!npm
Text2.Text = .Fields!KD_MK
sks.Caption = .Fields!sks
Kode.Caption = .Fields!SMSTER
Nama.Caption = .Fields!NM_MHS
kuliah.Caption = .Fields!NM_MK
Text3.SetFocus
End If
End With
End If
End Sub

Private Sub Text3_Change()
Dim totalnilai, totalsks, ip As Variant
Dim mutu, beban, skam As Long
Dim HM As String
HM = Text3.Text
beban = Val(sks.Caption)
If HM = “A” Or HM = “a” Then
mutu = 4
ElseIf HM = “B” Or HM = “b” Then
mutu = 3
ElseIf HM = “C” Or HM = “c” Then
mutu = 2
ElseIf HM = “D” Or HM = “d” Then
mutu = 1
Else
mutu = 0
End If
skam = beban * mutu
am.Caption = mutu
kam.Caption = skam

End Sub

Leave a comment