📄 xsdcx.frm
字号:
Top = 360
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 = 240
TabIndex = 4
Top = 720
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 = 240
TabIndex = 3
Top = 1080
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 = 1440
Width = 1335
End
End
End
End
Attribute VB_Name = "xsdcx"
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
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "ddbh" & " = '" & Trim(Text1.Text) & "'"
Case 1
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "spbh" & " = '" & Trim(Text1.Text) & "'"
Case 2
dhdcl1.Data1.Recordset.FindFirst "spmc='" & Trim(Text1.Text) & "'"
bh = dhdcl1.Data1.Recordset("spbh")
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "spbh" & " = '" & bh & "'"
Case 3
If Combo1.Text = "等于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "lrrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "lrrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "lrrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 4
If Combo1.Text = "等于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "dhrq " & " = #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "大于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "dhrq" & " > #" & Format(CDate(Trim(Text1.Text)), "mmm d yyyy") & "#"
End If
If Combo1.Text = "小于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "dhrq" & " < #" & Format(CDate(Text1.Text), "mmm d yyyy") & "#"
End If
Case 5
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "jsren" & " = '" & Trim(Text1.Text) & "'"
Case 6
If Combo1.Text = "等于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "je " & " = " & Trim(Text1.Text)
End If
If Combo1.Text = "大于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "je" & " > " & Text1.Text
End If
If Combo1.Text = "小于" Then
dhdcl1.Data2.RecordSource = "select * from spdhd where " & "dhrq" & " < " & Text1.Text
End If
End Select
' dhdcl1.Text1.Text = dhdcl1.Data2.Recordset("ddbh")
' dhdcl1.Text16.Text = dhdcl1.Data2.Recordset("spbh")
' dhdcl1.Text3.Text = dhdcl1.Data2.Recordset("jsren")
' dhdcl1.Text10.Text = dhdcl1.Data2.Recordset("jhdj")
' dhdcl1.Text15.Text = dhdcl1.Data2.Recordset("sl")
' dhdcl1.Text11.Text = dhdcl1.Data2.Recordset("je")
' On Error Resume Next
' dhdcl1.Text9.Text = dhdcl1.Data2.Recordset("gg")
' dhdcl1.Text12.Text = dhdcl1.Data2.Recordset("kw")
' dhdcl1.Text5.Text = dhdcl1.Data2.Recordset("bz")
' dhdcl1.Text2.Text = dhdcl1.Data2.Recordset("lrrq")
' dhdcl1.Text4.Text = dhdcl1.Data2.Recordset("dhrq")
' 'DDTPicker2.Value = Data2.Recordset("dhrq")
' dhdcl1.Data1.Recordset.FindFirst "spbh = " & "'" & dhdcl1.Text16 & "'"
' dhdcl1.Text9.Text = dhdcl1.Data1.Recordset("spmc")
' dhdcl1.Text3.Text = dhdcl1.Data1.Recordset("dw")
' dhdcl1.Text10.Text = dhdcl1.Data1.Recordset("ghs")
'dhdcl1.Data2.Recordset.MoveLast
' dhdcl1.Data2.Refresh
' 'dhdcl1.Data2.Recordset.MoveFirst
' dhdcl1.Data2.Recordset.MoveLast
' l = dhdcl1.Data2.Recordset.RecordCount
' dhdcl1.StatusBar1.Panels(2).Text = "共找到符合条件的记录 " & l & " 条"
'
' dhdcl1.Show
'zyxx.Data1.Refresh
'zyxx.Data1.Recordset.MoveFirst
dhdcl1.Data2.Refresh
If dhdcl1.Data2.Recordset.BOF = True Then
MsgBox "没有找到符合条件的记录。", vbInformation, "提示"
Unload Me
Else
'dhdcl1.Data2.Recordset.MoveFirst
dhdcl1.Data2.Recordset.MoveLast
l = dhdcl1.Data2.Recordset.RecordCount
dhdcl1.StatusBar1.Panels(2).Text = "共找到符合条件的记录 " & l & " 条"
dhdcl1.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
Combo1.Enabled = True
Unload Me
End Sub
Private Sub Image1_Click()
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 + -