📄 frminputearning.frm
字号:
Private Sub txtDcOPNo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtCheckNo.Text = txtDcOPNo.Text
txtToTalMoney.SetFocus
End If
End Sub
Private Sub txtDcOPNo_LostFocus()
txtDcName = NoToName(Trim(txtDcOPNo))
txtCheckName.Text = txtDcName.Text
If txtDcName = "" Then
MsgBox "无此点钞员工号,请检查重输!", vbExclamation, "提示..."
txtDcOPNo.SetFocus
Exit Sub
End If
End Sub
Private Sub txtDriverNo_Change()
If Not IsNumeric(txtDriverNo) Then
txtDriverNo = 0
End If
End Sub
Private Sub txtDriverNo_GotFocus()
txtDriverNo.SelLength = Len(txtDriverNo)
End Sub
Private Sub txtDriverNo_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
cmbSxw.SetFocus
End If
End Sub
Private Sub txtDriverNo_LostFocus()
If txtDriverNo.Text = "" Then
txtDriverNo = "0"
txtDriverName = "补单"
End If
txtDriverName = DrNoToName(Trim(txtDriverNo))
If txtDriverName = "" Then
'MsgBox "无此司机工号,请检查重输!", vbExclamation, "提示..."
txtDriverName = "补单"
Exit Sub
End If
End Sub
Private Sub txtLineNo_Change()
If Not IsNumeric(txtLineNo) Then
txtLineNo = 0
End If
End Sub
Private Sub txtLineNo_GotFocus()
txtLineNo.SelLength = Len(txtLineNo)
End Sub
Private Sub txtLineNo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbCompany.SetFocus
End If
End Sub
Private Sub txtM100_Change()
If Not IsNumeric(txtM100.Text) Then
txtM100 = 0
End If
End Sub
Private Sub txtM100_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM50.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM50_Change()
If Not IsNumeric(txtM50.Text) Then
txtM50 = 0
End If
End Sub
Private Sub txtM50_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM20.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM20_Change()
If Not IsNumeric(txtM20.Text) Then
txtM20 = 0
End If
End Sub
Private Sub txtM20_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM10.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM10_Change()
If Not IsNumeric(txtM10.Text) Then
txtM10 = 0
End If
End Sub
Private Sub txtM10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM5.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM5_Change()
If Not IsNumeric(txtM5.Text) Then
txtM5 = 0
End If
End Sub
Private Sub txtM5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM2.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM2_Change()
If Not IsNumeric(txtM2.Text) Then
txtM2 = 0
End If
End Sub
Private Sub txtM2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM1.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM1_Change()
If Not IsNumeric(txtM1.Text) Then
txtM1 = 0
End If
End Sub
Private Sub txtM1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM05.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM05_Change()
If Not IsNumeric(txtM05.Text) Then
txtM05 = 0
End If
End Sub
Private Sub txtM05_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM02.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM02_Change()
If Not IsNumeric(txtM02.Text) Then
txtM02 = 0
End If
End Sub
Private Sub txtM02_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM01.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM01_Change()
If Not IsNumeric(txtM01.Text) Then
txtM01 = 0
End If
End Sub
Private Sub txtM01_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM005.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM005_Change()
If Not IsNumeric(txtM005.Text) Then
txtM005 = 0
End If
End Sub
Private Sub txtM005_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM002.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM002_Change()
If Not IsNumeric(txtM002.Text) Then
txtM002 = 0
End If
End Sub
Private Sub txtM002_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM001.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM001_Change()
If Not IsNumeric(txtM001.Text) Then
txtM001 = 0
End If
End Sub
Private Sub txtM001_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdOK.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM100_LostFocus()
sumMonetNum
End Sub
Private Sub txtM100_GotFocus()
txtM100.SelLength = Len(txtM100)
End Sub
Private Sub txtM50_LostFocus()
sumMonetNum
End Sub
Private Sub txtM50_GotFocus()
txtM50.SelLength = Len(txtM50)
End Sub
Private Sub txtM20_LostFocus()
sumMonetNum
End Sub
Private Sub txtM20_GotFocus()
txtM20.SelLength = Len(txtM20)
End Sub
Private Sub txtM10_LostFocus()
sumMonetNum
End Sub
Private Sub txtM10_GotFocus()
txtM10.SelLength = Len(txtM10)
End Sub
Private Sub txtM5_LostFocus()
sumMonetNum
End Sub
Private Sub txtM5_GotFocus()
txtM5.SelLength = Len(txtM5)
End Sub
Private Sub txtM2_LostFocus()
sumMonetNum
End Sub
Private Sub txtM2_GotFocus()
txtM2.SelLength = Len(txtM2)
End Sub
Private Sub txtM1_LostFocus()
sumMonetNum
End Sub
Private Sub txtM1_GotFocus()
txtM1.SelLength = Len(txtM1)
End Sub
Private Sub txtM05_LostFocus()
sumMonetNum
End Sub
Private Sub txtM05_GotFocus()
txtM05.SelLength = Len(txtM05)
End Sub
Private Sub txtM02_LostFocus()
sumMonetNum
End Sub
Private Sub txtM02_GotFocus()
txtM02.SelLength = Len(txtM02)
End Sub
Private Sub txtM01_LostFocus()
sumMonetNum
End Sub
Private Sub txtM01_GotFocus()
txtM01.SelLength = Len(txtM01)
End Sub
Private Sub txtM005_LostFocus()
sumMonetNum
End Sub
Private Sub txtM005_GotFocus()
txtM005.SelLength = Len(txtM005)
End Sub
Private Sub txtM002_LostFocus()
sumMonetNum
End Sub
Private Sub txtM002_GotFocus()
txtM002.SelLength = Len(txtM002)
End Sub
Private Sub txtM001_LostFocus()
sumMonetNum
cmdOK.SetFocus
End Sub
Private Sub txtM001_GotFocus()
txtM001.SelLength = Len(txtM001)
End Sub
Private Sub sumMonetNum()
' txtToTalMoney = CDbl(txtM100) * 100 + CDbl(txtM50) * 50 + CDbl(txtM20) * 20 + _
' CDbl(txtM10) * 10 + CDbl(txtM5) * 5 + CDbl(txtM2) * 2 + _
' CDbl(txtM1) * 1 + CDbl(txtM05) * 0.5 + CDbl(txtM02) * 0.2 + _
' CDbl(txtM01) * 0.1 + CDbl(txtM005) * 0.05 + CDbl(txtM002) * 0.02 + CDbl(txtM001) * 0.01
' txtTotalNum = CDbl(txtM100) + CDbl(txtM50) + CDbl(txtM20) + CDbl(txtM10) + CDbl(txtM5) + CDbl(txtM2) + CDbl(txtM1) + CDbl(txtM05) + CDbl(txtM02) + CDbl(txtM01) + CDbl(txtM005) + CDbl(txtM002) + CDbl(txtM001)
Dim AveSum As Double
AveSum = CDbl(txtToTalMoney) / CDbl(TxtAvePrice)
txtTotalNum = IIf(Int(AveSum) < AveSum, Int(AveSum) + 1, Int(AveSum))
End Sub
Private Sub txtToTalMoney_Change()
If Not IsNumeric(txtToTalMoney) Then
txtToTalMoney = 0
End If
End Sub
Private Sub txtToTalMoney_GotFocus()
txtToTalMoney.SelLength = Len(txtToTalMoney)
End Sub
Private Sub txtToTalMoney_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
cmdOK.SetFocus
End If
End Sub
Private Sub txtToTalMoney_LostFocus()
sumMonetNum
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -