Tugas Visual basic

Slide1

 

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

Text1.SetFocus

End Sub

Private Sub Command2_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “‘”

Text1.SetFocus

End Sub

Private Sub Command3_Click()

Data1.Recordset.Update

Data1.Refresh

End Sub

Private Sub Command6_Click()

Data1.Recordset.Delete

End Sub

Private Sub text1_keypress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

Private Sub text2_keypress(keyascii As Integer)

If keyascii = 13 Then

Text3.SetFocus

End If

End Sub

Private Sub Command4_Click()

Text4.Text = Val(Text2.Text) * Val(Text3.Text)

If Text3 > 5 Then

Text5.Text = Val(Text4.Text) * 0.02

ElseIf Text3 < 5 Then

Text5.Text = 0

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

Private Sub Command5_Click()

Unload Me

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