Anda di halaman 1dari 5

Ilmu Komputer

Nama :Wahyu Syahidah

NIM :0907055021

Tugas Kuis tanggal 1 November 2010


1. Buatlah suatu database untuk menyimpan data pembayaran SPP Mahasiswa
2. Nama database : Akademik , nama table : SPP
3. User interface sebagai berikut

Rincian:
Fmipa : PS. Ilkom Rp.1.500.000
PS. Kimia Rp.1.300.000
PS. Biologi Rp.1.300.000
PS. Fisika Rp.1.000.000
PS. Statistika Rp.1.750.000
Teknik : PS. Pertambangan Rp.1.500.000
PS. Industri Rp.1.300.000
Fekon : PS. Akuntansi Rp.2.500.000
PS. Manajemen Rp.1.700.000

Source Code
Private Sub Combo1_Click()
Ilmu Komputer
If Combo1.ListIndex = 0 Then
Combo2.Clear
Combo2.Text = "Jurusan"
Combo2.AddItem "Ilmu Komputer"
Combo2.AddItem "Fisika"
Combo2.AddItem "Kimia"
Combo2.AddItem "Biologi"
Combo2.AddItem "Statistika"
ElseIf Combo1.ListIndex = 1 Then
Combo2.Clear
Combo2.Text = "Jurusan"
Combo2.AddItem "Pertambangan"
Combo2.AddItem "Industri"
ElseIf Combo1.ListIndex = 2 Then
Combo2.Clear
Combo2.Text = "Jurusan"
Combo2.AddItem "Akuntansi"
Combo2.AddItem "Manajemen"
End If
End Sub

Private Sub Combo2_Click()


If Combo1.ListIndex = 0 Then
If Combo2.ListIndex = 0 Then
Text3.Text = "1500000"
Text4.Text = "2500000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 1 Then
Text3.Text = "1300000"
Text4.Text = "2000000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 2 Then
Text3.Text = "1300000"
Text4.Text = "2500000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 3 Then
Text3.Text = "1000000"
Text4.Text = "1700000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 4 Then
Text3.Text = "1750000"
Ilmu Komputer
Text4.Text = "2000000"
Text5.Text = Val(Text3) + Val(Text4)
End If
ElseIf Combo1.ListIndex = 1 Then
If Combo2.ListIndex = 0 Then
Text3.Text = "1500000"
Text4.Text = "1300000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 1 Then
Text3.Text = "1300000"
Text4.Text = "2000000"
Text5.Text = Val(Text3) + Val(Text4)
End If
ElseIf Combo1.ListIndex = 2 Then
If Combo2.ListIndex = 0 Then
Text3.Text = "2000000"
Text4.Text = "3000000"
Text5.Text = Val(Text3) + Val(Text4)
ElseIf Combo2.ListIndex = 1 Then
Text3.Text = "1700000"
Text4.Text = "2500000"
Text5.Text = Val(Text3) + Val(Text4)
End If
End If
End Sub

Private Sub Command1_Click()


Adodc1.Recordset.AddNew
Adodc1.Recordset!nim = Text1.Text
Adodc1.Recordset!nama = Text2.Text
Adodc1.Recordset!fakultas = Combo1.Text
Adodc1.Recordset!jurusan = Combo2.Text
Adodc1.Recordset!spp = Text3.Text
Adodc1.Recordset!lain = Text4.Text
Adodc1.Recordset!total = Text5.Text
Adodc1.Recordset.Save
MsgBox "Data tersimpan!"
End Sub

Private Sub Command2_Click()


Text1.Text = ""
Ilmu Komputer
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Combo1.Text = "Fakultas"
Combo2.Text = "Jurusan"

End Sub

Private Sub Command3_Click()


End

End Sub

Private Sub Form_Load()


Adodc1.Refresh
End Sub

Tampilan Running
Ilmu Komputer

Tampilan data yang tersimpan di database

Anda mungkin juga menyukai