📄 czdd1.frm
字号:
Left = 240
TabIndex = 5
Top = 360
Value = -1 'True
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "商品编号"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 1560
TabIndex = 4
Top = 2040
Visible = 0 'False
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "商品名称"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Index = 2
Left = 1560
TabIndex = 3
Top = 2400
Visible = 0 'False
Width = 1335
End
Begin VB.OptionButton Option1
Caption = "录入日期"
BeginProperty Font
Name = "宋体"
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 = 2
Top = 1200
Width = 1335
End
End
End
End
Attribute VB_Name = "czdd1"
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
spth.Data2.RecordSource = "select * from spdhd where " & "ddbh" & " = '" & Trim(Text1.Text) & "'"
Case 1
'spth.Data6.Recordset.FindFirst "spbh" & " = '" & Trim(Text1.Text) & "'"
'不同订单中有同一种商品
spth.Data6.RecordSource = "select * from spdhd where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
spth.Data2.RecordSource = "select * from spdhd where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
Case 2
spth.Data1.Recordset.FindFirst "spmc='" & Trim(Text1.Text) & "'"
bh = spth.Data1.Recordset("spbh")
spth.Data2.RecordSource = "select * from spdhd where " & "spbh" & " = '" & bh & "'"
Case 3
If Combo1.Text = "等于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "lrrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "lrrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "lrrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 4
If Combo1.Text = "等于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "dhrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "dhrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "dhrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 5
spth.Data2.RecordSource = "select * from spdhd where " & "jsr" & " = '" & Trim(Text1.Text) & "'"
Case 6
If Combo1.Text = "等于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "ljje " & " = " & Trim(Text1.Text)
End If
If Combo1.Text = "大于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "ljje" & " > " & Text1.Text
End If
If Combo1.Text = "小于" Then
spth.Data2.RecordSource = "select * from spdhd where " & "ljje" & " < " & Text1.Text
End If
End Select
spth.Data2.Refresh
If spth.Data2.Recordset.BOF = True Then
MsgBox "没有找到符合条件的记录。", vbInformation, "提示"
Unload Me
Else
'spth.Data2.Recordset.MoveFirst
spth.Data2.Recordset.MoveLast
l = spth.Data2.Recordset.RecordCount
spth.StatusBar1.Panels(2).Text = "共找到符合条件的记录 " & l & " 条"
spth.Show
End If
'spdhd1.Data2.Recordset.MoveFirst
Unload Me
'Combo1.Enabled = True
End Sub
Private Sub Command2_Click()
'zyxx.Data1.RecordSource = "select * from zyzl"
'zyxx.Data1.Refresh
'zyxx.Show
spth.Show
Combo1.Enabled = True
Unload Me
End Sub
Private Sub Option1_Click(Index As Integer)
If Option1(0).Value = True Then
Text1.Text = ""
Combo1.Enabled = False
End If
If Option1(1).Value = True Then
Text1.Text = ""
Combo1.Enabled = False
End If
If Option1(2).Value = True Then
Text1.Text = ""
Combo1.Enabled = False
End If
If Option1(3).Value = True Then
Text1.Text = "##-##-##"
Combo1.Enabled = True
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Text = "##-##-##"
Combo1.Enabled = True
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text1.Text = ""
Combo1.Enabled = False
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text1.Text = ""
Combo1.Enabled = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -