Tugas 10

TUGAS 10

 

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

Textjk = jenis

Texths = hs

Textjj.SetFocus

End Sub

 

 

Private Sub Cmdclose_Click()

Form2.Show

End Sub

 

 

Private Sub Cmdhl_Click()

Cbocode.SetFocus

Cbocode = “”

Textjk = “”

Texths = “”

Textjj = “”

Textdis = “”

Texthb = “”

End Sub

 

 

 

Private Sub Cmdproses_Click()

Texthp = Val(Textjj) * Val(Texths)

If Val(Texthp) > “30000000” Then

Textdis = Val(Texthp) * 0.15

ElseIfVal(Texthp) > “25000000” Then

Textdis = Val(Texthp) * 0.1

ElseIfVal(Texthp) > “20000000” Then

Textdis = Val(Texthp) * 0.05

ElseIfVal(Texthp) > “15000000” Then

Textdis = Val(Texthp) * 0.02

End If

Texthb = Val(Texthp) – Val(Textdis)

End Sub

 

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

Cbocode.SetFocus

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

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()

Form1.Show

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s