📄 教材入库查询条件.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form 教材入库查询条件
BorderStyle = 3 'Fixed Dialog
Caption = "教材入库查询"
ClientHeight = 3150
ClientLeft = 1860
ClientTop = 2355
ClientWidth = 6015
Icon = "教材入库查询条件.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3150
ScaleWidth = 6015
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 3075
Left = 60
TabIndex = 0
Top = 0
Width = 5895
Begin VB.Frame Frame2
Caption = "查询条件"
Height = 1035
Left = 120
TabIndex = 5
Top = 180
Width = 5655
Begin VB.OptionButton Option5
Caption = "书类别"
Height = 375
Left = 4380
TabIndex = 10
Top = 420
Width = 915
End
Begin VB.OptionButton Option1
Caption = "经手人"
Height = 315
Left = 120
TabIndex = 9
Top = 420
Width = 975
End
Begin VB.OptionButton Option2
Caption = "入库日期"
Height = 315
Left = 1200
TabIndex = 8
Top = 420
Width = 1035
End
Begin VB.OptionButton Option3
Caption = "教材名"
Height = 315
Left = 2340
TabIndex = 7
Top = 420
Width = 915
End
Begin VB.OptionButton Option4
Caption = "出版社"
Height = 315
Left = 3300
TabIndex = 6
Top = 420
Width = 915
End
End
Begin VB.Frame Frame3
Caption = "值"
Height = 915
Left = 120
TabIndex = 3
Top = 1320
Width = 5655
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 600
TabIndex = 11
Top = 240
Width = 4395
_ExtentX = 7752
_ExtentY = 661
_Version = 393216
Format = 53477377
CurrentDate = 38379
End
Begin VB.TextBox Text1
Height = 375
Left = 600
TabIndex = 4
Top = 240
Width = 4395
End
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 450
Left = 2700
TabIndex = 2
Top = 2460
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 450
Left = 4140
TabIndex = 1
Top = 2460
Width = 1335
End
End
End
Attribute VB_Name = "教材入库查询条件"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Option1.Value = False And Option2.Value = False And Option3.Value = False And Option4.Value = False And Option5.Value = False Then MsgBox "请选择查找方式!", , "系统提示"
If Option1.Value = True Then
教材入库查询.Command3.Enabled = False
If Text1 <> "" Then
教材入库查询.Adodc1.RecordSource = "select * from 教材入库表 where 经手人 like '%" & Text1 & "%'"
教材入库查询.Adodc1.Refresh
If 教材入库查询.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到您所需要结果!", , "系统提示"
Else
Unload Me
End If
Else
MsgBox "请输入要查询的值!"
Text1.SetFocus
End If
End If
If Option2.Value = True Then
教材入库查询.Adodc1.RecordSource = "select * from 教材入库表 where 入库日期=#" & DTPicker1.Value & "#"
教材入库查询.Adodc1.Refresh
If 教材入库查询.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到您所需要结果!", , "系统提示"
Else
Unload Me
End If
End If
If Option3.Value = True Then
'教材入库查询.Command3.Enabled = False
If Text1 <> "" Then
教材入库查询.Adodc1.RecordSource = "select * from 教材入库表 where 教材名 like '%" & Text1.Text & "%'"
教材入库查询.Adodc1.Refresh
If 教材入库查询.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到您所需要结果!", , "系统提示"
Else
Unload Me
End If
Else
MsgBox "请输入要查询的值!"
Text1.SetFocus
End If
End If
If Option4.Value = True Then
If Text1 <> "" Then
教材入库查询.Adodc1.RecordSource = "select * from 教材入库表 where 出版社 like '%" & Text1.Text & "%'"
教材入库查询.Adodc1.Refresh
If 教材入库查询.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到您所需要结果!", , "系统提示"
Else
Unload Me
End If
Else
MsgBox "请输入要查询的值!"
Text1.SetFocus
End If
End If
If Option5.Value = True Then
教材入库查询.Command3.Enabled = True
If Text1 <> "" Then
教材入库查询.Adodc1.RecordSource = "select * from 教材入库表 where 书类别 like '%" & Text1.Text & "%'"
教材入库查询.Adodc1.Refresh
dylx = 1
If 教材入库查询.Adodc1.Recordset.RecordCount = 0 Then
MsgBox "没有找到您所需要结果!", , "系统提示"
Else
Unload Me
End If
Else
MsgBox "请输入要查询的值!"
Text1.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
教材入库查询.Show
End Sub
Private Sub Form_Activate()
Option1.Value = True
DTPicker1.Visible = False
End Sub
Private Sub Option1_Click()
DTPicker1.Visible = False
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Option2_Click()
DTPicker1.Visible = True
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Option3_Click()
DTPicker1.Visible = False
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Option4_Click()
DTPicker1.Visible = False
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Option5_Click()
DTPicker1.Visible = False
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Text1_Click()
Text1.Text = ""
Text1.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -