📄 frmbar.frm
字号:
End Sub
Private Sub Form_Load()
strcnn = "provider=sqloledb.1;persist security info=false;" & _
"user id=sa;initial catalog=ytdbo;" & _
"data source=linbo"
cn.Open strcnn
cmbGrade.AddItem "特等品"
cmbGrade.AddItem "一等品"
cmbGrade.AddItem "二等品"
cmbGrade.AddItem "三等品"
cmbStandard.AddItem "FZ/T81007-1994"
cmbStandard.AddItem "FZ/T81006-1992"
cmbStandard.AddItem "FZ/T81008-1994"
cmbStandard.AddItem "FZ/T73008-1997"
cmbStandard.AddItem "FZ/T81004-1991"
cmbStandard.AddItem "GB/T2660-1999"
cmbStandard.AddItem "GB/T14272-1993"
cmbStandard.AddItem "FZ/T73003-1991"
cmbStandard.AddItem "GB/T8878-1997"
cmbStandard.AddItem "FZ/T73001-1998"
cmbStandard.AddItem "GB/T2662-1999"
cmbStandard.AddItem "QB/T1333-1996"
cmbStandard.AddItem "FZ/T63005-1993"
cmbStandard.AddItem "GB/T15107-1993"
cmbMl1.AddItem "真丝"
cmbMl1.AddItem "丝光棉"
cmbMl1.AddItem "棉"
cmbMl1.AddItem "粘胶"
cmbMl1.AddItem "麻"
cmbMl1.AddItem "木桨纤维"
cmbMl1.AddItem "涤纶"
cmbMl1.AddItem "锦纶"
cmbMl1.AddItem "羊毛"
cmbMl1.AddItem "羊绒"
cmbMl1.AddItem "兔毛"
cmbMl1.AddItem "雪兰毛"
cmbMl1.AddItem "腈纶"
cmbMl1.AddItem "狐狸毛"
cmbMl1.AddItem "雕毛"
cmbMl1.AddItem "人造丝"
cmbMl1.AddItem "氨纶"
cmbMl1.AddItem "羽绒"
cmbMl1.AddItem "棉绒"
cmbMl1.AddItem "羊皮"
cmbMl1.AddItem "猪皮"
cmbMl1.AddItem "牛皮"
cmbMl1.AddItem "马皮"
cmbMl1.AddItem "驴皮"
cmbMl1.AddItem "京皮"
cmbMl1.AddItem "鳄鱼皮"
cmbMl1.AddItem "人造皮"
cmbMl1.AddItem "人造革"
cmbMl1.AddItem "醋酸纤维"
cmbMl1.AddItem "中空纤维"
cmbMl1.AddItem "棉桨纤维"
cmbMl1.AddItem "奶质纤维"
cmbMl1.AddItem "聚脂纤维"
cmbMl1.AddItem "任意"
cmbMl1.AddItem "拉架"
cmbMl1.AddItem "氢纶"
cmbMl1.AddItem "尼龙"
cmbMl1.AddItem "海马毛"
cmbMl2.AddItem "真丝"
cmbMl2.AddItem "丝光棉"
cmbMl2.AddItem "棉"
cmbMl2.AddItem "粘胶"
cmbMl2.AddItem "麻"
cmbMl2.AddItem "木桨纤维"
cmbMl2.AddItem "涤纶"
cmbMl2.AddItem "锦纶"
cmbMl2.AddItem "羊毛"
cmbMl2.AddItem "羊绒"
cmbMl2.AddItem "兔毛"
cmbMl2.AddItem "雪兰毛"
cmbMl2.AddItem "腈纶"
cmbMl2.AddItem "狐狸毛"
cmbMl2.AddItem "雕毛"
cmbMl2.AddItem "人造丝"
cmbMl2.AddItem "氨纶"
cmbMl2.AddItem "羽绒"
cmbMl2.AddItem "棉绒"
cmbMl2.AddItem "羊皮"
cmbMl2.AddItem "猪皮"
cmbMl2.AddItem "牛皮"
cmbMl2.AddItem "马皮"
cmbMl2.AddItem "驴皮"
cmbMl2.AddItem "京皮"
cmbMl2.AddItem "鳄鱼皮"
cmbMl2.AddItem "人造皮"
cmbMl2.AddItem "人造革"
cmbMl2.AddItem "醋酸纤维"
cmbMl2.AddItem "中空纤维"
cmbMl2.AddItem "棉桨纤维"
cmbMl2.AddItem "奶质纤维"
cmbMl2.AddItem "聚脂纤维"
cmbMl2.AddItem "任意"
cmbMl2.AddItem "拉架"
cmbMl2.AddItem "氢纶"
cmbMl2.AddItem "尼龙"
cmbMl2.AddItem "海马毛"
cmbMl3.AddItem "真丝"
cmbMl3.AddItem "丝光棉"
cmbMl3.AddItem "棉"
cmbMl3.AddItem "粘胶"
cmbMl3.AddItem "麻"
cmbMl3.AddItem "木桨纤维"
cmbMl3.AddItem "涤纶"
cmbMl3.AddItem "锦纶"
cmbMl3.AddItem "羊毛"
cmbMl3.AddItem "羊绒"
cmbMl3.AddItem "兔毛"
cmbMl3.AddItem "雪兰毛"
cmbMl3.AddItem "腈纶"
cmbMl3.AddItem "狐狸毛"
cmbMl3.AddItem "雕毛"
cmbMl3.AddItem "人造丝"
cmbMl3.AddItem "氨纶"
cmbMl3.AddItem "羽绒"
cmbMl3.AddItem "棉绒"
cmbMl3.AddItem "羊皮"
cmbMl3.AddItem "猪皮"
cmbMl3.AddItem "牛皮"
cmbMl3.AddItem "马皮"
cmbMl3.AddItem "驴皮"
cmbMl3.AddItem "京皮"
cmbMl3.AddItem "鳄鱼皮"
cmbMl3.AddItem "人造皮"
cmbMl3.AddItem "人造革"
cmbMl3.AddItem "醋酸纤维"
cmbMl3.AddItem "中空纤维"
cmbMl3.AddItem "棉桨纤维"
cmbMl3.AddItem "奶质纤维"
cmbMl3.AddItem "聚脂纤维"
cmbMl3.AddItem "任意"
cmbMl3.AddItem "拉架"
cmbMl3.AddItem "氢纶"
cmbMl3.AddItem "尼龙"
cmbMl3.AddItem "海马毛"
cmbMl4.AddItem "真丝"
cmbMl4.AddItem "丝光棉"
cmbMl4.AddItem "棉"
cmbMl4.AddItem "粘胶"
cmbMl4.AddItem "麻"
cmbMl4.AddItem "木桨纤维"
cmbMl4.AddItem "涤纶"
cmbMl4.AddItem "锦纶"
cmbMl4.AddItem "羊毛"
cmbMl4.AddItem "羊绒"
cmbMl4.AddItem "兔毛"
cmbMl4.AddItem "雪兰毛"
cmbMl4.AddItem "腈纶"
cmbMl4.AddItem "狐狸毛"
cmbMl4.AddItem "雕毛"
cmbMl4.AddItem "人造丝"
cmbMl4.AddItem "氨纶"
cmbMl4.AddItem "羽绒"
cmbMl4.AddItem "棉绒"
cmbMl4.AddItem "羊皮"
cmbMl4.AddItem "猪皮"
cmbMl4.AddItem "牛皮"
cmbMl4.AddItem "马皮"
cmbMl4.AddItem "驴皮"
cmbMl4.AddItem "京皮"
cmbMl4.AddItem "鳄鱼皮"
cmbMl4.AddItem "人造皮"
cmbMl4.AddItem "人造革"
cmbMl4.AddItem "醋酸纤维"
cmbMl4.AddItem "中空纤维"
cmbMl4.AddItem "棉桨纤维"
cmbMl4.AddItem "奶质纤维"
cmbMl4.AddItem "聚脂纤维"
cmbMl4.AddItem "任意"
cmbMl4.AddItem "拉架"
cmbMl4.AddItem "氢纶"
cmbMl4.AddItem "尼龙"
cmbMl4.AddItem "海马毛"
cmbLl1.AddItem "真丝"
cmbLl1.AddItem "丝光棉"
cmbLl1.AddItem "棉"
cmbLl1.AddItem "粘胶"
cmbLl1.AddItem "麻"
cmbLl1.AddItem "木桨纤维"
cmbLl1.AddItem "涤纶"
cmbLl1.AddItem "锦纶"
cmbLl1.AddItem "羊毛"
cmbLl1.AddItem "羊绒"
cmbLl1.AddItem "兔毛"
cmbLl1.AddItem "雪兰毛"
cmbLl1.AddItem "腈纶"
cmbLl1.AddItem "狐狸毛"
cmbLl1.AddItem "雕毛"
cmbLl1.AddItem "人造丝"
cmbLl1.AddItem "氨纶"
cmbLl1.AddItem "羽绒"
cmbLl1.AddItem "棉绒"
cmbLl1.AddItem "羊皮"
cmbLl1.AddItem "猪皮"
cmbLl1.AddItem "牛皮"
cmbLl1.AddItem "马皮"
cmbLl1.AddItem "驴皮"
cmbLl1.AddItem "京皮"
cmbLl1.AddItem "鳄鱼皮"
cmbLl1.AddItem "人造皮"
cmbLl1.AddItem "人造革"
cmbLl1.AddItem "醋酸纤维"
cmbLl1.AddItem "中空纤维"
cmbLl1.AddItem "棉桨纤维"
cmbLl1.AddItem "奶质纤维"
cmbLl1.AddItem "聚脂纤维"
cmbLl1.AddItem "任意"
cmbLl1.AddItem "拉架"
cmbLl1.AddItem "氢纶"
cmbLl1.AddItem "尼龙"
cmbLl1.AddItem "海马毛"
cmbLl2.AddItem "真丝"
cmbLl2.AddItem "丝光棉"
cmbLl2.AddItem "棉"
cmbLl2.AddItem "粘胶"
cmbLl2.AddItem "麻"
cmbLl2.AddItem "木桨纤维"
cmbLl2.AddItem "涤纶"
cmbLl2.AddItem "锦纶"
cmbLl2.AddItem "羊毛"
cmbLl2.AddItem "羊绒"
cmbLl2.AddItem "兔毛"
cmbLl2.AddItem "雪兰毛"
cmbLl2.AddItem "腈纶"
cmbLl2.AddItem "狐狸毛"
cmbLl2.AddItem "雕毛"
cmbLl2.AddItem "人造丝"
cmbLl2.AddItem "氨纶"
cmbLl2.AddItem "羽绒"
cmbLl2.AddItem "棉绒"
cmbLl2.AddItem "羊皮"
cmbLl2.AddItem "猪皮"
cmbLl2.AddItem "牛皮"
cmbLl2.AddItem "马皮"
cmbLl2.AddItem "驴皮"
cmbLl2.AddItem "京皮"
cmbLl2.AddItem "鳄鱼皮"
cmbLl2.AddItem "人造皮"
cmbLl2.AddItem "人造革"
cmbLl2.AddItem "醋酸纤维"
cmbLl2.AddItem "中空纤维"
cmbLl2.AddItem "棉桨纤维"
cmbLl2.AddItem "奶质纤维"
cmbLl2.AddItem "聚脂纤维"
cmbLl2.AddItem "任意"
cmbLl2.AddItem "拉架"
cmbLl2.AddItem "氢纶"
cmbLl2.AddItem "尼龙"
cmbLl2.AddItem "海马毛"
End Sub
Private Sub mnuHelpAbout_Click()
frmAbout.Show
frmAbout.SetFocus
End Sub
Private Sub Picture1_DblClick(Index As Integer)
frmIcon.intIndex = Index
mdlFunction.CenterForm frmIcon
frmIcon.Show vbModal
'frmIcon.SetFocus
End Sub
Private Sub Picture1_GotFocus(Index As Integer)
With Picture1(Index)
'.BackColor = &HC0FFC0
End With
End Sub
Private Sub Picture1_LostFocus(Index As Integer)
With Picture1(Index)
'.BackColor = &H80000005
End With
End Sub
Private Sub txtLlCf1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbLl2.SetFocus
End If
End Sub
Private Sub txtLlCf2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbStandard.SetFocus
End If
End Sub
Private Sub txtCf1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbMl2.SetFocus
End If
End Sub
Private Sub txtCf2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbMl3.SetFocus
End If
End Sub
Private Sub txtCf3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbMl4.SetFocus
End If
End Sub
Private Sub txtCf4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbLl1.SetFocus
End If
End Sub
Private Sub txtChecker_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Picture1(0).SetFocus
End If
End Sub
Private Sub txtColor_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim strColor As String
strColor = txtColor.Text
strSQL = "select pdcolor_code from product_color " & _
" where pdcolor_code='" & Trim(strColor) & "'"
Set rs = New ADODB.Recordset
rs.Open strSQL, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
If Not rs.EOF Then
txtSize.SetFocus
Else
MsgBox "款号错误!"
txtColor.SetFocus
SendKeys "{home}+{end}"
End If
End If
End Sub
Private Sub txtPrice_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbMl1.SetFocus
End If
End Sub
Private Sub txtPrintQty_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtPrice.SetFocus
SendKeys "{home}+{end}"
End If
End Sub
Private Sub txtSize_KeyPress(KeyAscii As Integer)
Dim strStyle As String
If KeyAscii = 13 Then
strStyle = txtTypeID.Text & txtColor.Text & txtSize.Text
strSQL = "select pdstyle_style,pdstyle_priceretail from product_style " & _
" where pdstyle_style='" & strStyle & "'"
Set rs = New ADODB.Recordset
rs.Open strSQL, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
If Not rs.EOF Then
txtPrice.Text = rs!pdstyle_priceretail
txtPrintQty.SetFocus
txtPrintQty.Text = 1
SendKeys "{home}+{end}"
Else
MsgBox "款号错误!"
txtSize.SetFocus
SendKeys "{home}+{end}"
End If
End If
End Sub
Private Sub txtSpec_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmbGrade.SetFocus
End If
End Sub
Private Sub txtStyle_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim strStyle As String
strStyle = txtStyle.Text
strSQL = "select pdtype_typeid,pdtype_typename from product_type " & _
" where pdtype_typeid like '_____" & Trim(strStyle) & "'"
Set rs = New ADODB.Recordset
rs.Open strSQL, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
If Not rs.EOF Then
txtTypeID.Text = rs!pdtype_typeid
txtTypeName.Text = rs!pdtype_typename
txtColor.SetFocus
Else
MsgBox "款号错误!"
txtStyle.SetFocus
SendKeys "{home}+{end}"
End If
cmbMl1.Text = "棉"
txtCf1.Text = 100
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -