Tugas Kuliah Visual Basic

PS VB

Private Sub Command1_Click()

Data1.Recordset.AddNew

txtnb.SetFocus

End Sub

Private Sub Command2_Click()

txtnb.Text = “”

txthb.Text = “”

txtjb.Text = “”

txtbyr.Text = “”

txtpot.Text = “”

txttb.Text = “”

txtnb.SetFocus

End Sub

Private Sub Command3_Click()

Data1.Recordset.Update

txtjb.SetFocus

End Sub

Private Sub Command4_Click()

txtbyr.Text = Val(txthb.Text) * Val(txtjb.Text)

If txtjb> 5 Then

txtpot.Text = Val(txtbyr.Text) * 0.02

txttb.Text = Val(txtbyr.Text) – Val(txtpot.Text)

End If

End Sub

Private Sub Command5_Click()

Unload Me

Data1.Refresh

End Sub

Private Sub Command6_Click()

Data1.Recordset.Delete

Data1.Refresh

End Sub

Private Sub txthb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjb.SetFocus

End If

End Sub

Private Sub txtnb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthb.SetFocus

End If

End Sub

2 Tanggapan

  1. ka makasih ya.
    ngebantu banget🙂

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: