Txtkode.Text = ""
txtharga.Text = ""
txtjenis.Text = ""
txtjam.Text = ""
txtjumlah.Text = ""
txttotal.Text = ""
Txtkode.SetFocus
End Sub
Private Sub cmdout_Click()
End
End Sub
Private Sub cmdproses_Click()
Dim B As String
B = Left(Txtkode.Text, 3)
If B = "BIM" Then
txtharga.Text = "50000"
txtjenis.Text = "BIMA"
txtjam.Text = "16.00"
ElseIf B = "EKO" Then
txtharga.Text = "35000"
txtjenis.Text = "EKONOMI"
txtjam.Text = "19.00"
ElseIf B = "MUT" Then
txtharga.Text = "23000"
txtjenis.Text = "MUTIARA"
txtjam.Text = "17.00"
ElseIf B = "SEN" Then
txtharga.Text = "15000"
txtjenis.Text = "SENJA"
txtjam.Text = "20.00"
End If
txtjumlah.SetFocus
End Sub
Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotal.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
End If
End Sub
Tidak ada komentar:
Posting Komentar