Visual Basic

Private Sub Command1_Click()
Data1.Recordset.AddNew
End Sub

Private Sub Command2_Click()
Data1.Recordset.Delete
Data1.Refresh
End Sub

Private Sub Command3_Click()
Data1.Recordset.Update
Text1.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)
ElseIf txtjb < 5 Then
txtpot.Text = 0
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

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: