KARYA KU

NILAI MAHASISWA
1. PROJECT


2.FORM

3. DATABASE




4. RUMUS

Private Sub CmdHapus_Click()
X = MsgBox("ANDA YAKIN INGIN MENGHAPUS DATA INI......?", vbQuestion + vbYesNo, "HAPUS DATA")
If X = vbYes Then
Set DataGrid1.DataSource = Adodc1
Adodc1.Recordset.Delete
X = MsgBox("DATA SUDAH TERHAPUS", vbQuestion + vbYesNo, "HAPUS DATA")
Else
Cancel = 1
X = MsgBox("DATA TIDAK TERHAPUS", vbQuestion + vbYesNo, "HAPUS DATA")
End If
End Sub

Private Sub CmdHitung_Click()
If CmbKode.Text = "PTI001" Then TextMATAKUL.Text = "Penghantar Teknologi Informasi"
If CmbKode.Text = "ALG002" Then TextMATAKUL.Text = "Algoritma dan Pemprograman"
If CmbKode.Text = "MMF003" Then TextMATAKUL.Text = "Macro Media Flash"

TextANGKA.Text = Val(0.1 * TextABSEN.Text) + Val(0.2 * TextTUGAS.Text) + Val(0.3 * TextUTS.Text) + Val(0.4 * TextUAS.Text)

If TextANGKA.Text >= 80 And TextANGKA.Text <= 100 Then TextHURUF.Text = "A"
If TextANGKA.Text >= 70 And TextANGKA.Text <= 89 Then TextHURUF.Text = "B"
If TextANGKA.Text >= 60 And TextANGKA.Text <= 79 Then TextHURUF.Text = "C"
If TextANGKA.Text >= 50 And TextANGKA.Text <= 59 Then TextHURUF.Text = "D"
If TextANGKA.Text <= 49 Then TextHURUF.Text = "E"


If TextHURUF.Text = "A" Then TextPREDIKAT.Text = "Dengan Pujian"
If TextHURUF.Text = "B" Then TextPREDIKAT.Text = "Sangat Memuaskan"
If TextHURUF.Text = "C" Then TextPREDIKAT.Text = "Memuaskan"
If TextHURUF.Text = "D" Then TextPREDIKAT.Text = "Kurang Baik"
If TextHURUF.Text = "E" Then TextPREDIKAT.Text = "Kurang Terpuji"

If TextHURUF.Text = "A" Then TextKET.Text = "Dapat Beasiswa"
If TextHURUF.Text = "B" Then TextKET.Text = "Dapat Bonus"
If TextHURUF.Text = "C" Then TextKET.Text = "Dapat Mainan"
If TextHURUF.Text = "D" Then TextKET.Text = "Dapat Senjata"
If TextHURUF.Text = "E" Then TextKET.Text = "Dapat Cibiran"
End Sub

Private Sub CmdSelesai_Click()
End
End Sub

Private Sub CmdSimpan_Click()
Adodc1.Recordset!NPM = TextNPM.Text
Adodc1.Recordset!Nama_Mahasiswa = TextNAMA.Text
Adodc1.Recordset!Kode_MataKul = CmbKode.Text
Adodc1.Recordset!Nama_MataKul = TextMATAKUL.Text
Adodc1.Recordset!Absen = TextABSEN.Text
Adodc1.Recordset!Nilai_Tugas = TextTUGAS.Text
Adodc1.Recordset!Nilai_UTS = TextUTS.Text
Adodc1.Recordset!Nilai_UAS = TextUAS.Text
Adodc1.Recordset!Nilai_Angka = TextANGKA.Text
Adodc1.Recordset!Nilai_Huruf = TextHURUF.Text
Adodc1.Recordset!Predikat = TextPREDIKAT.Text
Adodc1.Recordset!Keterangan = TextKET.Text
End Sub

Private Sub CmdTambah_Click()
Adodc1.Recordset.AddNew
End Sub

Tidak ada komentar:

Posting Komentar