TUGAS11

Private Sub Cmdkeluar_Click()

Form2.Show

End Sub

 

Private Sub cmdlagi_Click()

Textkt.SetFocus

Textkt = “”

Textht = “”

Textjk = “”

Textjb = “”

Textjt = “”

Texttp = “”

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

S = Left(Textkode.Text, 3)

If S = “BIM” Then

Textjenis.Text = “BIMA”

Texthartik.Text = “50000”

Textjam.Text = “16.00 WIB”

ElseIf S = “EKO” Then

Textjenis.Text = “EKONOMI”

Texthartik.Text = “35000”

Textjam.Text = “19.00 WIB”

ElseIf S = “MUT” Then

Textjenis.Text = “MUTIARA”

Texthartik.Text = “23000”

Textjam.Text = “17.00 WIB”

ElseIf S = “SEN” Then

Textjenis.Text = “SENJA”

Texthartik.Text = “15000”

Textjam.Text = “20.00 WIB”

End If

Texttotal.Text = Val(Texthartik.Text) * Val(Textjumlah.Text)

Textjumlah.SetFocus

End Sub

 

Private Sub Command1_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Command3_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub Textjumlah_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Texttotal = Val(Texthartik) * Val(Textjumlah)

End If

End Sub

Private Sub Command1_Click()

Form2.Show

 

End Sub

 

Private Sub Command2_Click()

End

End Sub

Iklan