Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Check box, image
1. Check Box
Private Sub Command1_Click()
If Check0 = True Then Buku = 6000
If Check1 = True Then Pena = 5000
If Check2 = True Then Pencil = 1500
If Check3 = True Then Penghapus = 1000
Total = Buku + Pena + Pencil + Penghapus
Text1 = Total
End Sub
Private Sub Command2_Click()
Check0 = 0
Check1 = 0
Check2 = 0
Check3 = 0
Text1 = Clear
End Sub
Private Sub Command3_Click()
DoCmd.Close
End Sub
2. Combo Box
Private Sub Form_Load() Else
Combo1.AddItem "Direktur" Gaji = 750000
Combo1.AddItem "Sekretaris" Tunjangan = 0.025 * Gaji
Combo1.AddItem "Bendahara" Total = Gaji + Tunjangan
Combo1.AddItem "Staff" End If
End Sub Text3 = Gaji
Text4 = Tunjangan
Private Sub Combo1_Click() Text5 = Total
If Combo1.ListIndex = -1 Then End Sub
Gaji = 0
Tunjangan = 0 Private Sub Command1_Click()
Total = 0 Text1 = Clear
ElseIf Combo1.ListIndex = 0 Then Text2 = Clear
Gaji = 1500000 Combo1 = Clear
Tunjangan = 0.1 * Gaji Text3 = Clear
Total = Gaji + Tunjangan Text4 = Clear
ElseIf Combo1.ListIndex = 1 Then Text5 = Clear
Gaji = 1200000 Text1.SetFocus
Tunjangan = 0.08 * Gaji End Sub
Total = Gaji + Tunjangan
ElseIf Combo1.ListIndex = 2 Then Private Sub Command11_Click()
Gaji = 1000000 DoCmd.Close
Tunjangan = 0.05 * Gaji End Sub
Total = Gaji + Tunjangan
3. Image Control
Private Sub Check1_Click()
If Check1.Value = True Then
Image1.Visible = True
Else
Image1.Visible = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = True Then
Image2.Visible = True
Else
Image2.Visible = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = True Then
Image3.Visible = True
Else
Image3.Visible = False
End If
End Sub