📄 frminsearch.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmInSearch
BorderStyle = 3 'Fixed Dialog
Caption = "查询参数设置"
ClientHeight = 2535
ClientLeft = 45
ClientTop = 330
ClientWidth = 6090
Icon = "frmInSearch.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2535
ScaleWidth = 6090
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "请选择以下条件"
ForeColor = &H00800000&
Height = 1710
Left = 60
TabIndex = 4
Top = 90
Width = 5895
Begin MSComCtl2.DTPicker DTe
Height = 285
Left = 4140
TabIndex = 10
Top = 540
Width = 1305
_ExtentX = 2302
_ExtentY = 503
_Version = 393216
Format = 53673985
CurrentDate = 37887
End
Begin MSComCtl2.DTPicker DTs
Height = 285
Left = 1560
TabIndex = 9
Top = 510
Width = 1395
_ExtentX = 2461
_ExtentY = 503
_Version = 393216
Format = 53673985
CurrentDate = 37887
End
Begin VB.ComboBox ctype
Height = 300
Left = 1560
TabIndex = 1
ToolTipText = "选择或输入规格"
Top = 1095
Width = 1395
End
Begin VB.ComboBox cname
Height = 300
Left = 4140
TabIndex = 0
Top = 1080
Width = 1320
End
Begin VB.Line Line3
BorderColor = &H00FFFFFF&
X1 = 510
X2 = 5535
Y1 = 975
Y2 = 975
End
Begin VB.Line Line2
X1 = 525
X2 = 5535
Y1 = 960
Y2 = 960
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "起始日期:"
Height = 180
Index = 0
Left = 480
TabIndex = 8
Top = 555
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "物品名称:"
Height = 180
Index = 2
Left = 3060
TabIndex = 7
Top = 1125
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "物品类别:"
Height = 180
Index = 3
Left = 480
TabIndex = 6
Top = 1140
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "结束日期:"
Height = 180
Index = 5
Left = 3150
TabIndex = 5
Top = 600
Visible = 0 'False
Width = 900
End
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关闭(&C)"
Height = 390
Left = 4710
TabIndex = 3
Top = 1920
Width = 1230
End
Begin VB.CommandButton cmdOK
Caption = "确定(&O)"
Default = -1 'True
Height = 390
Left = 3420
TabIndex = 2
Top = 1920
Width = 1230
End
End
Attribute VB_Name = "frmInSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Dim dbs As Database
Dim fl As String
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim t As String
t = "Select * From " & fl & "where 日期>=#" & DTs.Value & "# and 日期<=#" & DTe.Value & "#"
If ctype.Text <> "全部" Then
t = t & " and Type='" & ctype.Text & "'"
End If
If cname.Text <> "全部" Then
t = t & " and 名称='" & cname.Text & "'"
End If
If fl = "storelisthi" Then
frminquery.qstr = t
Else
frmstorequery.qstr = t
End If
Unload Me
End Sub
Private Sub ctype_Click()
SetNU
End Sub
Public Sub FormLoad(flag As String)
DTs.Value = Date
DTe.Value = Date
ctype.AddItem "全部"
Set dbs = OpenDatabase(ConData, False, False, Constr)
Set rst = dbs.OpenRecordset("Select menuname From menutype", dbOpenDynaset)
Do While Not rst.EOF
ctype.AddItem rst!menuname
rst.MoveNext
Loop
ctype.ListIndex = 0
rst.Close
SetNU
fl = flag
Me.Show
End Sub
Private Sub SetNU()
Dim r As Recordset
cname.Clear
cname.AddItem "全部"
Set r = dbs.OpenRecordset("Select 名称,单位 From EatList where menutype='" & tmp & "'", dbOpenDynaset)
Do While Not r.EOF
cname.AddItem r!名称
r.MoveNext
Loop
cname.ListIndex = 0
r.Close
Set r = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -