📄 frmzjdj-a.frm
字号:
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "留用数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 15
Left = 3120
TabIndex = 37
Top = 4920
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "送检数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 4
Left = 3120
TabIndex = 36
Top = 2640
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "一级品"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 3
Left = 3120
TabIndex = 35
Top = 3000
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "二级品"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 2
Left = 3120
TabIndex = 34
Top = 3360
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "料质数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 1
Left = 3120
TabIndex = 33
Top = 3765
Width = 975
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "送检日期"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 0
Left = 3000
TabIndex = 32
Top = 5400
Width = 1275
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "流水号"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 360
Index = 5
Left = 8520
TabIndex = 31
Top = 480
Width = 1155
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "返工数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 300
Index = 6
Left = 3120
TabIndex = 30
Top = 4200
Width = 975
End
Begin VB.Label Lablsh
Alignment = 2 'Center
BackStyle = 0 'Transparent
BeginProperty Font
Name = "黑体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 450
Left = 7920
TabIndex = 29
Top = 1320
Width = 2385
End
End
End
End
Attribute VB_Name = "Frmzjdj01"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim CmdExe As ADODB.Command
Dim LConRs As ADODB.Recordset
Dim Mrc As ADODB.Recordset
Dim AddFlg As Boolean
Dim CBJ As String
Dim TxtSql As String
Dim CKMC As String
Dim CJMC As String
Dim YGXM As String
Private Sub CmbCK1_LostFocus()
CmbCK2.Text = CmbCK1.Text
End Sub
Private Sub CmbPM_Click()
If Trim(CmbPM.Text) = "" Then
CmbPM.SetFocus
Else
Dim Mrc As ADODB.Recordset
Set Mrc = New ADODB.Recordset
TxtSql = "select * from Bs_产品图号 where 品名='" & CmbPM.Text & "'"
Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenForwardOnly, adLockReadOnly, adCmdText
If Mrc.EOF = True Then
CmbPM.SetFocus
MsgBox "请正确填选品名!"
Exit Sub
End If
CmbTH.Text = Mrc!图号
TxtGG.Text = Mrc!规格
Mrc.Close
End If
End Sub
Private Sub CmbTH_Click()
If Trim(CmbTH.Text) = "" Then
CmbTH.SetFocus
Else
Dim Mrc As ADODB.Recordset
Set Mrc = New ADODB.Recordset
TxtSql = "select * from Bs_产品图号 where 图号='" & CmbTH.Text & "'"
Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenForwardOnly, adLockReadOnly, adCmdText
If Mrc.EOF = True Then
CmbTH.SetFocus
MsgBox "请正确填选图号!"
Exit Sub
End If
CmbPM.Text = Mrc!品名
TxtGG.Text = Mrc!规格
Mrc.Close
End If
End Sub
Private Sub CmbPM_LostFocus()
Dim Mrc As ADODB.Recordset
Set Mrc = New ADODB.Recordset
TxtSql = "select * from Bs_产品图号 where 品名='" & CmbPM.Text & "'"
Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenForwardOnly, adLockReadOnly, adCmdText
If Mrc.EOF = True Then
MsgBox "没有此品名!"
CmbTH.SetFocus
CmbTH.Text = ""
TxtGG.Text = ""
Exit Sub
End If
CmbTH.Text = Mrc!图号
TxtGG.Text = Mrc!规格
Mrc.Close
End Sub
Private Sub CmbTH_LostFocus()
Dim Mrc As ADODB.Recordset
Set Mrc = New ADODB.Recordset
TxtSql = "select * from Bs_产品图号 where 图号='" & CmbTH.Text & "'"
Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenForwardOnly, adLockReadOnly, adCmdText
If Mrc.EOF = True Then
CmbPM.Text = ""
TxtGG.Text = ""
Exit Sub
End If
CmbPM.Text = Mrc!品名
TxtGG.Text = Mrc!规格
Mrc.Close
End Sub
Private Sub CmdSec_Click()
On Error GoTo ErrLine
Dim dd(4) As Boolean
TxtSql = "select Sc_检验表.ID,工序名称,Sc_检验表.图号,品名,规格,部门名称,员工姓名,送检数,仓库名称1,一级品,二级品,料质数,返工数,废品数,留用数,仓库名称1,仓库名称2,送检日期,Sc_检验表.创建者 from Sc_检验表 inner join Bs_产品图号 on Sc_检验表.图号=Bs_产品图号.图号 where "
If Check1(0).Value = 1 Then
If Cmb1.Text = "领料日期" Or Cmb1.Text = "送检日期" Then
If Trim(txt01.Text) = "" Or Cmb1.Text = "" Or Like1.Text = "" Then
MsgBox "搜索条件第1行有空!", vbOKOnly + vbExclamation, "警告"
Cmb1.SetFocus
Exit Sub
Else
dd(0) = True
If Like1.Text = "Like" Then
MsgBox "日期数据不支持“LIKE”!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
TxtSql = TxtSql & Cmb1.Text & " " & Like1.Text & " '" & Trim(txt01.Text) & "' "
End If
End If
Else
If Trim(txt01.Text) = "" Or Cmb1.Text = "" Or Like1.Text = "" Then
MsgBox "搜索条件第1行有空!", vbOKOnly + vbExclamation, "警告"
Cmb1.SetFocus
Exit Sub
Else
dd(0) = True
If Like1.Text = "Like" Then
TxtSql = TxtSql & Cmb1.Text & " " & Like1.Text & " '%" & Trim(txt01.Text) & "%' "
Else
TxtSql = TxtSql & Cmb1.Text & " " & Like1.Text & " '" & Trim(txt01.Text) & "' "
End If
End If
End If
End If
If Check1(1).Value = 1 Then
If Trim(Txt02.Text) = "" Or Cmb2.Text = "" Or Like2.Text = "" Then
MsgBox "搜索条件第2行有空", vbOKOnly + vbExclamation, "警告"
Cmb2.SetFocus
Exit Sub
Else
If Cmb2.Text = "领料日期" Or Cmb2.Text = "送检日期" Then
dd(1) = True
If dd(0) = True Then
If Like2.Text = "Like" Then
MsgBox "日期数据不支持“LIKE”!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
TxtSql = TxtSql & " and " & Cmb2.Text & " " & Like2.Text & " '" & Trim(Txt02.Text) & "' "
End If
Else
If Like2.Text = "Like" Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -