TUGAS10

 

Private Sub Cbocode_Click()

Dim jenis, hs As String

Select Case Cbocode

Case “P205”

jenis = “Pentium II 500 Mega Hz”

hs = “1500000”

Case “P308”

jenis = “Pentium III 800 Mega Hz ”

hs = “2100000 ”

Case “P310”

jenis = “pentium III 1.0 Giga Hz”

hs = “3500000 ”

Case “P415”

jenis = “Pentium IV 1.5 Giga Hz”

hs = “4000000 ”

Case “P417”

jenis = “Pentium IV 1.7 Giga Hz ”

hs = “4200000 ”

Case “P419”

jenis = “Pentium IV 1.9 Giga Hz”

hs = “5500000 ”

End Select

Textjenis = jenis

Texths = hs

Textjumlah.SetFocus

End Sub

 

 

Private Sub Cmdclose_Click()

Form2.Show

End Sub

 

 

Private Sub Cmdhl_Click()

Cbocode.SetFocus

Cbocode = “”

Textjenis = “”

Texths = “”

txthp = “”

Textjumlah = “”

Textdiskont = “”

Texthb = “”

End Sub

 

 

 

Private Sub Cmdproses_Click()

Texthp = Val(Textjumlah) * Val(Texths)

If Val(Texthp) > “30000000” Then

Textdiscont = Val(Texthp) * 15 / 100

ElseIf Val(Texthp) > “25000000” Then

Textdiscont = Val(Texthp) * 10 / 100

ElseIf Val(Texthp) > “20000000” Then

Textdiscont = Val(Texthp) * 5 / 100

ElseIf Val(Texthp) > “15000000” Then

Textdiscont = Val(Texthp) * 2 / 100

End If

Texthb = Val(Texthp) – Val(Textdiscont)

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Form_Activate()

Cbocode.SetFocus

Cbocode = “”

Textjenis = “”

Texths = “”

Textjumlah = “”

Textdiskont = “”

Texthb = “”

End Sub

 

Private Sub Form_Load()

Cbocode.AddItem “P205”

Cbocode.AddItem “P308”

Cbocode.AddItem “P310”

Cbocode.AddItem “P415”

Cbocode.AddItem “P417”

Cbocode.AddItem “P419”

End Sub

 

Private Sub Command1_Click()

Form2.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

Iklan