Saturday, October 29, 2011

Toko Swalayan Program

Terms of Problem:

1. The others in the ordinary input.
2. when the amount bought in the press enter the total price paid will appear.
3. current at the input of money to pay the money back will appear.
4. when the program runs, the display of textbox in an inactive state, and after the click data input and then active again.

Use the textbox tool, command buttons and labels


This is the listing Program :







Private Sub cmdinput_Click()
txtnofak.Enabled = True
txtnofak.Text = ""
txtkobar.Enabled = True
txtkobar.Text = ""
txtnabar.Enabled = True
txtnabar.Text = ""
txtharga.Enabled = True
txtharga.Text = ""
txtjumbel.Enabled = True
txtjumbel.Text = ""
txttotbay.Enabled = False
txttotbay.Text = ""
txtubay.Enabled = True
txtubay.Text = ""
txtukem.Enabled = False
txtukem.Text = ""
txtnofak.SetFocus
End Sub

Private Sub cmdkeluar_Click()
If MsgBox("Yakin lw mau keluar ???", 36, "Warning") = vbYes Then
End
End If
End Sub

Private Sub Form_Activate()
txtnofak.Enabled = False
txtkobar.Enabled = False
txtnabar.Enabled = False
txtharga.Enabled = False
txtjumbel.Enabled = False
txttotbay.Enabled = False
txtubay.Enabled = False
txtukem.Enabled = False
cmdinput.SetFocus
End Sub


Private Sub txtjumbel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    txttotbay = Val(txtharga) * Val(txtjumbel)
    txtubay.SetFocus
End If
End Sub

Private Sub txtubay_Change()
txtukem.Text = Val(txtubay) - Val(txttotbay)
End Sub



Enjoy it... ^_^
If anyone does not understand please ask and leave a comment ..
and do not forget to follow our blog ..^_^


No comments:

Post a Comment