📄 cxxsd.frm
字号:
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 3
Left = 240
TabIndex = 4
Top = 1440
Width = 1335
End
End
Begin VB.Frame Frame3
Caption = "查询内容"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 855
Left = 2160
TabIndex = 1
Top = 1320
Width = 2415
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 240
TabIndex = 2
Top = 360
Width = 1935
End
End
End
End
Attribute VB_Name = "cxxsd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public a As Integer
Private Sub Command1_Click()
Dim oIndex As Integer
If Option1(0).Value = True Then
oIndex = 0
End If
If Option1(1).Value = True Then
oIndex = 1
End If
If Option1(2).Value = True Then
oIndex = 2
End If
If Option1(3).Value = True Then oIndex = 3
If Option2.Value = True Then oIndex = 4
If Option3.Value = True Then oIndex = 5
If Option4.Value = True Then oIndex = 6
'查找职员
Select Case oIndex
Case 0
xhdcl.Data2.RecordSource = "select * from xhdd where " & "ddbh" & " = '" & Trim(Text1.Text) & "'"
xhdcl.Adodc1.RecordSource = "select * from xhdsp where " & "ddbh" & " = '" & Trim(Text1.Text) & "'"
Case 1
' xhdcl.Data2.RecordSource = "select * from spdhd where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
xhdcl.Adodc1.RecordSource = "select spbh,ddbh,gg,dj,sl,ysje,zk,bz from xhdsp where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
xhdcl.Adodc1.Refresh
Case 2
xhdcl.Data1.Recordset.FindFirst "spmc='" & Trim(Text1.Text) & "'"
bh = xhdcl.Data1.Recordset("spbh")
xhdcl.Adodc1.RecordSource = "select * from xhdsp where " & "spbh" & " = '" & bh & "'"
Case 3
If Combo1.Text = "等于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "lrrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "lrrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "lrrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 4
If Combo1.Text = "等于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "fhrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "fhrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "fhrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 5
xhdcl.Data2.RecordSource = "select * from xhdd where " & "jsr" & " = '" & Trim(Text1.Text) & "'"
Case 6
If Combo1.Text = "等于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "ljje " & " = " & Val(Text1.Text)
End If
If Combo1.Text = "大于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "ljje" & " > " & Val(Text1.Text)
End If
If Combo1.Text = "小于" Then
xhdcl.Data2.RecordSource = "select * from xhdd where " & "ljje" & " < " & Val(Text1.Text)
End If
xhdcl.Adodc1.RecordSource = "select * from xhdsp where " & "ddbh" & " = '" & (Text1.Text) & "'"
End Select
xhdcl.Data2.Refresh
If xhdcl.Data2.Recordset.BOF = True Then
MsgBox "没有找到符合条件的记录。", vbInformation, "提示"
xhdcl.Adodc1.RecordSource = "select spbh,ddbh,gg,dj,sl,ysje,zk,bz from xhdsp "
xhdcl.Data2.RecordSource = "select * from xhdd"
xhdcl.Adodc1.Refresh
xhdcl.Data2.Refresh
xhdcl.Text1.Text = xhdcl.Data2.Recordset("ddbh")
xhdcl.Text2.Text = xhdcl.Data2.Recordset("lrrq")
xhdcl.Text3.Text = xhdcl.Data2.Recordset("fhrq")
'Text4.Text = Data2.Recordset("ghs")
xhdcl.Text6.Text = xhdcl.Data2.Recordset("ljje")
xhdcl.Text7.Text = xhdcl.Data2.Recordset("dingjin")
'Text7.Text = Data2.Recordset("zk")
On Error Resume Next
xhdcl.Data1.Recordset.FindFirst "spbh='" & xhdcl.Adodc1.Recordset("spbh") & "'"
''Text8.Text = Data1.Recordset("spmc")
xhdcl.Text4.Text = xhdcl.Data1.Recordset("ghs")
'Text14.Text = Data1.Recordset("dw")
' Text7.Text = Data1.Recordset("ys")
xhdcl.Adodc1.Recordset.Filter = " ddbh = '" & xhdcl.Text1.Text & "'"
xhdcl.Show
Unload Me
Else
' If oIndex = 1 Then
' xhdcl.Adodc1.Recordset.MoveLast
' l = xhdcl.Adodc1.Recordset.RecordCount
' xhdcl.StatusBar1.Panels(3).Text = "共找到符合条件的记录 " & l & " 条"
' xhdcl.Show
' Else
xhdcl.Data2.Recordset.MoveFirst
xhdcl.Data2.Recordset.MoveLast
l = xhdcl.Data2.Recordset.RecordCount
xhdcl.StatusBar1.Panels(3).Text = "共找到符合条件的订单 " & l & " 张"
xhdcl.Show
End If
'spdhd1.Data2.Recordset.MoveFirst
xhdcl.DataGrid1.Columns(0).Width = 1000
xhdcl.DataGrid1.Columns(1).Width = 1000
xhdcl.DataGrid1.Columns(2).Width = 1500
xhdcl.DataGrid1.Columns(3).Width = 1000
xhdcl.DataGrid1.Columns(4).Width = 1000
xhdcl.DataGrid1.Columns(5).Width = 1000
xhdcl.DataGrid1.Columns(6).Width = 1000
xhdcl.DataGrid1.Columns(7).Width = 1000
xhdcl.DataGrid1.Columns(0).Caption = " 商品编号"
xhdcl.DataGrid1.Columns(2).Caption = " 规格"
'xhdcl.DataGrid1.Columns(3).Caption = " 颜色"
xhdcl.DataGrid1.Columns(3).Caption = " 单价"
xhdcl.DataGrid1.Columns(4).Caption = " 数量"
xhdcl.DataGrid1.Columns(5).Caption = " 应收金额"
xhdcl.DataGrid1.Columns(6).Caption = " 折扣"
xhdcl.DataGrid1.Columns(7).Caption = " 备注"
Unload Me
'Combo1.Enabled = True
End Sub
Private Sub Command2_Click()
'zyxx.Data1.RecordSource = "select * from zyzl"
'zyxx.Data1.Refresh
'zyxx.Show
'Combo1.Enabled = True
'xhdcl.Show
xhdcl.Show
Unload Me
End Sub
Private Sub Option1_Click(Index As Integer)
If Option1(0).Value = True Then Combo1.Enabled = False
If Option1(1).Value = True Then Combo1.Enabled = False
If Option1(2).Value = True Then Combo1.Enabled = False
If Option1(3).Value = True Then Combo1.Enabled = True
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then Combo1.Enabled = True
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then Combo1.Enabled = False
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then Combo1.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -