Tugas 7

TUGAS 7

Private Sub cmdno_Click()

End

End Sub

 

Private Sub cmdyes_Click()

Form1.Show

End Sub

 

Private Sub Cmdadd_Click()

Data1.Recordset.addnew

Txtkode.SetFocus

End Sub

 

Private Sub Cmdcancel_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Cmdhitung_Click()

Txtby.Text = Val(Txthb.Text) * Val(Txtjb.Text)

If Val(Txtjb.Text) > “5” Then

Txtpot.Text = Val(Txtby) * 0.02

Txttb.Text = Val(Txtby.Text) – (Txtpot.Text)

End If

End Sub

 

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub Cmdproses_Click()

Dim H, nb, hbAs String

 

H = Mid(Txtkode, 5, 2)

If H = “SP” Or H = “sp” Then

Txtnb.Text = “Spidol”

Txthb.Text = “9500”

ElseIf H = “BT” Or H = “bt” Then

Txtnb.Text = “BukuTulis”

Txthb.Text = “12500”

ElseIf H = “TP” Or H = “tp” Then

Txtnb.Text = “Tip EX”

Txthb.Text = “3000”

ElseIf H = “PG” Or H = “pd” Then

Txtnb.Text = “Penggaris”

Txthb.Text = “2500”

ElseIf H = “PT” Or H = “pt” Then

Txtnb.Text = “PapanTulis”

Txthb.Text = “5000”

End If

Txtjb.SetFocus

End Sub

 

Private Sub Cmdsave_Click()

Data1.Recordset.Update

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