📄 f_zhengzhaofuyincx.frm
字号:
End
Begin VB.CheckBox Check2
Caption = "Check2"
Height = 255
Left = 1800
TabIndex = 7
Top = 360
Width = 255
End
Begin VB.CheckBox Check3
Caption = "Check3"
Height = 255
Left = 3240
TabIndex = 6
Top = 360
Width = 255
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 375
Left = 7080
TabIndex = 5
Top = 840
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 8400
TabIndex = 4
Top = 840
Width = 1095
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 300
Left = 4800
TabIndex = 9
Top = 840
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 529
_Version = 393216
Format = 87883777
CurrentDate = 36251
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 2160
TabIndex = 10
Top = 840
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 529
_Version = 393216
Format = 87883777
CurrentDate = 36251
End
Begin VB.Label Label6
Caption = "复印份数"
Height = 255
Left = 5280
TabIndex = 19
Top = 360
Width = 855
End
Begin VB.Label Label1
Caption = "证照名称"
Height = 255
Left = 720
TabIndex = 17
Top = 360
Width = 975
End
Begin VB.Label Label2
Caption = "复印部门"
Height = 255
Left = 2160
TabIndex = 16
Top = 360
Width = 975
End
Begin VB.Label Label3
Caption = "复印时间"
Height = 255
Left = 3600
TabIndex = 15
Top = 360
Width = 855
End
Begin VB.Label Label4
Caption = "开始时间"
Height = 375
Left = 360
TabIndex = 14
Top = 840
Visible = 0 'False
Width = 735
End
Begin VB.Label Label5
Caption = "结束时间"
Height = 255
Left = 3960
TabIndex = 13
Top = 840
Visible = 0 'False
Width = 735
End
End
End
Attribute VB_Name = "F_ZhengZhaoFuYinCX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents rs As Recordset
Attribute rs.VB_VarHelpID = -1
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim WithEvents adoXianshiRS As Recordset
Attribute adoXianshiRS.VB_VarHelpID = -1
Dim JieYue_ID As String '为找到ID 的查询SQL 语句
Private Sub Check1_Click()
If Check1.Value = 1 Then
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Combo1.Clear
Sql = "select distinct 复印证照名称,复印部门,复印份数 from 证照复印"
Set rs = db.Execute(Sql)
Do While Not rs.EOF
If IsNull(rs("复印证照名称")) = False Then
Combo1.AddItem rs("复印证照名称")
End If
rs.MoveNext
Loop
Combo1.Visible = True
Combo2.Visible = False
Combo3.Visible = False
Label4.Visible = False
Label5.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Frame2.Visible = False
Frame3.Visible = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
Check1.Value = 0
Check3.Value = 0
Check4.Value = 0
Combo2.Clear
Sql = "select distinct 复印证照名称,复印部门 ,复印份数 from 证照复印"
Set rs = db.Execute(Sql)
Do While Not rs.EOF
If IsNull(rs("复印部门")) = False Then
Combo2.AddItem rs("复印部门")
End If
rs.MoveNext
Loop
Combo1.Visible = False
Combo2.Visible = True
Combo3.Visible = False
Label4.Visible = False
Label5.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Frame2.Visible = False
Frame3.Visible = False
End If
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
Check1.Value = 0
Check2.Value = 0
Check4.Value = 0
Combo1.Visible = False
Combo2.Visible = False
Combo3.Visible = False
Label4.Visible = True
Label5.Visible = True
DTPicker1.Visible = True
DTPicker2.Visible = True
Frame2.Visible = False
Frame3.Visible = False
End If
End Sub
Private Sub Check4_Click()
If Check4.Value = 1 Then
Check1.Value = 0
Check3.Value = 0
Check2.Value = 0
Combo3.Clear
Sql = "select distinct 复印证照名称,复印部门 ,复印份数 from 证照复印"
Set rs = db.Execute(Sql)
Do While Not rs.EOF
If IsNull(rs("复印份数")) = False Then
Combo3.AddItem rs("复印份数")
End If
rs.MoveNext
Loop
Combo1.Visible = False
Combo2.Visible = False
Combo3.Visible = True
Label4.Visible = False
Label5.Visible = False
DTPicker1.Visible = False
DTPicker2.Visible = False
Frame2.Visible = False
Frame3.Visible = False
End If
End Sub
Private Sub CmdXianShi_Exit_Click()
Frame2.Visible = True
Frame3.Visible = False
End Sub
Private Sub Command1_Click()
Dim DataGrid_sql As String '数据表格中的数据源
Dim oText As TextBox
If Check1.Value = 1 Then
DataGrid_sql = "select * from 证照复印 where 复印证照名称 ='" & Combo1.Text & "'"
End If
If Check2.Value = 1 Then
DataGrid_sql = "select * from 证照复印 where 复印部门 ='" & Combo2.Text & "'"
End If
If Check3.Value = 1 Then
DataGrid_sql = "select * from 证照复印 where 复印时间 between ' " & DTPicker1 & " ' and ' " & DTPicker2 & " '"
End If
If Check4.Value = 1 Then
DataGrid_sql = "select * from 证照复印 where 复印份数 =" & Combo3.Text
End If
If Check1.Value = 1 Or Check2.Value = 1 Or Check3.Value = 1 Or Check4.Value = 1 Then
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open DataGrid_sql, db, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = adoPrimaryRS
Frame3.Visible = False
Frame2.Visible = True
End If
End Sub
Private Sub Command2_Click()
ZhengZhaoGuanli.Enabled = True
Unload Me
End Sub
Private Sub Command3_Click()
Dim XianShi_sql As String '单条数据显示的数据源
If JieYue_ID = "" Then
MsgBox "请您选择其中一条信息!"
Exit Sub
Else
XianShi_sql = "select * from 证照复印 where ID = " & JieYue_ID
Set adoXianshiRS = New Recordset
adoXianshiRS.Open XianShi_sql, db, adOpenStatic, adLockOptimistic
For Each oText In Me.txtFields
Set oText.DataSource = adoXianshiRS
Next
Set DTPicker3.DataSource = adoXianshiRS
Set Combo4.DataSource = adoXianshiRS
End If
Frame2.Visible = False
Frame3.Visible = True
End Sub
Private Sub DataGrid1_Click()
If Not adoPrimaryRS.BOF And Not adoPrimaryRS.EOF Then
If Not IsNull(adoPrimaryRS.Fields("ID")) Then
JieYue_ID = adoPrimaryRS.Fields("ID")
Else
MsgBox "请您选择其中一条信息!"
End If
Else
Exit Sub
End If
End Sub
Private Sub Form_Load()
On Error Resume Next
For Each TextBox In Me.Controls
Next
Frame2.Visible = False
Frame3.Visible = False
For Each oText In Me.txtFields
oText.Locked = True
Next
DTPicker3.Enabled = True
Combo4.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -