- Back to Home »
- Contoh Tugas Visual Basic 6 Part II BSI Woltermonginsidi
Posted by : Unknown
Senin, 23 Desember 2013
Tugas Mandiri Pertemuan 12
contoh from :
List Program :
Private Sub Command_awal_Click()
Data1.Recordset.MoveFirst
MsgBox "Data Awal !", 48, "info"
End Sub
Private Sub Command_mundur_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
MsgBox "Data Awal !", 48, "info"
End If
End Sub
Private Sub Command_maju_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
MsgBox "data akhir !", 48, "info"
End If
End Sub
Private Sub Command_akhir_Click()
Data1.Recordset.MoveLast
MsgBox "Data Akhir !", 48, "info"
End Sub
Private Sub Command_tambah_Click()
bersih
End Sub
Private Sub Command_simpan_Click()
Data1.Recordset.AddNew
Data1.Recordset!Nim = Text1
Data1.Recordset!Nama = Text2
Data1.Recordset!Jurusan = Combo1
Data1.Recordset!Nilai_teori = Text3
Data1.Recordset!Nilai_praktek = Text4
Data1.Recordset.Update
End Sub
Private Sub Command_hapus_Click()
Data1.Recordset.Delete
End Sub
Private Sub Command_exit_Click()
Unload Me
p = MsgBox("Mau Keluar Gak Sih?", vbQuestion + vbOKCancel, "Informasi")
If p = vbOK Then
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5 = Val((Text3) + Val(Text4)) / 2
If Text5 >= 90 Then
Text6 = "A"
Text7 = "Memuaskan"
ElseIf Text5 >= 75 Then
Text6 = "B"
Text7 = "Sangat Baik"
ElseIf Text5 >= 65 Then
Text6 = "C"
Text7 = "Baik"
ElseIf Text5 >= 50 Then
Text6 = "D"
Text7 = "Kurang"
Else
Text6 = "E"
Text7 = "Buruk"
End If
End If
End Sub
Sub bersih()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Combo1 = "Pilih"
End Sub
Semoga Bermanfaat !!