Private Sub cmdbel_Click()
Combo1.Text = "Pilih Kode Barang"
txtjumbel.Text = ""
txttot.Text = ""
txtubay.Text = ""
txtukem.Text = ""
txtmerk.Text = ""
txthrga.Text = ""
txtstock.Text = ""
End Sub
Private Sub cmdhit_Click()
txttot.Text = Val(txtjumbel.Text) * Val(txthrga.Text)
End Sub
Private Sub Combo1_Click()
If Combo1.Text = "C01" Then
txtmerk.Text = "Pepsodent"
txthrga.Text = "6000"
txtstock.Text = "100"
txtjumbel.SetFocus
ElseIf Combo1.Text = "C02" Then
txtmerk.Text = "Close Up"
txthrga.Text = "5000"
txtstock.Text = "200"
txtjumbel.SetFocus
Else
txtmerk.Text = "Enzim"
txthrga.Text = "8000"
txtstock.Text = "400"
txtjumbel.SetFocus
End If
End Sub
Private Sub Form_Load()
txtmerk.Enabled = False
txtstock.Enabled = False
txthrga.Enabled = False
txttot.Enabled = False
txtukem.Enabled = False
End Sub
Private Sub Timer1_Timer()
lbltgl.Caption = Format(Date, "dddd, dd mmmm yyyy")
lbljam.Caption = Format(Time, "h:m:s")
End Sub
Private Sub txtjumbel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttot.Text = Val(txtjumbel.Text) * Val(txthrga.Text)
txtubay.SetFocus
End If
End Sub
Private Sub txtubay_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtukem.Text = Val(txtubay.Text) - Val(txttot.Text)
End If
End Sub
Tidak ada komentar:
Posting Komentar