Tugas 9

 

TUGAS 9

 

Private Sub Cbocode_Click()

Dim merk, hs As String

Select Case Cbocode

Case “A43SA”

merk = “ASUS A43SA-VX090D”

hs = “5500000”

Case “A43SD”

merk = “ASUS A43SD-VX052D”

hs = “45000000”

Case “A43SJ”

merk = “ASUS A43SJ-VX792D”

hs = “4300000”

Case “A43TA”

merk = “ASUS A43TA-VX034D”

hs = “4900000”

Case “N43SL”

merk = “ASUS N43SL-VX264D”

hs = “4300000”

Case “MD3111”

merk = “Apple MacBook Pro MD311”

hs = “19300000”

Case “MD313”

merk = “Apple MacBook Pro MD313”

hs = “24200000”

Case “MD314”

merk = “Apple MacBook Pro MD314”

hs = “11900000”

Case “MC311”

merk = “Apple MacBook Pro MC311”

hs = “24200000”

Case “MD322”

merk = “Apple MacBook Pro MD322”

hs = “14700000”

Case “MC965”

merk = “Apple MacBook Pro MC965”

End Select

Textmerk = merk

Texths = hs

Textjj.SetFocus

End Sub

 

 

 

Private Sub cmdhitung_Click()

Cbocode.SetFocus

Cbocode = “”

Textmerk = “”

Texths = “”

Textjj = “”

Texthp = “”

Textdis = “”

Texttotal = “”

End Sub

 

Private Sub cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdproses_Click()

Texthp = Val(Texths) * Val(Textjj)

If Val(Texthp) > 140000000 Then

Textdis = Val(Texthp) * 0.15

ElseIfVal(Texthp) > 135000000 Then

Textdis = Val(Texthp) * 0.1

ElseIfVal(Texthp) > 130000000 Then

Textdis = Val(Texthp) * 0.05

ElseIfVal(Texthp) > 125000000 Then

Textdis = Val(Texthp) * 0.02

End If

Texttotal = Val(Texthp) – Val(txtdis)

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 “A43SA”

Cbocode.AddItem “A43SD”

Cbocode.AddItem “A23SJ”

Cbocode.AddItem “A43TA”

Cbocode.AddItem “A43SL”

Cbocode.AddItem “MD311”

Cbocode.AddItem “MD313”

Cbocode.AddItem “MD314”

Cbocode.AddItem “MD322”

Cbocode.AddItem “MC965”

Cbocode.AddItem “MC314”

Cbocode.AddItem “MC318”

Cbocode.AddItem “MC322”

Cbocode.AddItem “MC965”

Cbocode.AddItem “MC966”

End Sub

 

 

Private Sub Textjj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Texthp.SetFocus

End If

End Sub

Private Sub Command1_Click()

Data1.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