📄 frmqueryall.frm
字号:
VERSION 5.00
Begin VB.Form frmQueryAll
BackColor = &H00404040&
BorderStyle = 1 'Fixed Single
Caption = "详细资料查询"
ClientHeight = 6240
ClientLeft = 45
ClientTop = 435
ClientWidth = 8145
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6240
ScaleWidth = 8145
Begin VB.CommandButton cmdNextSID
Caption = "下一位"
Height = 345
Left = 6720
TabIndex = 27
Top = 5760
Width = 975
End
Begin VB.TextBox txt
Height = 300
Index = 11
Left = 3480
TabIndex = 26
Top = 5760
Width = 3135
End
Begin VB.CommandButton cmdSID
Caption = "按身份证号查找"
Height = 345
Left = 1800
TabIndex = 25
Top = 5760
Width = 1575
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 10
Left = 4080
TabIndex = 22
Top = 4920
Width = 3615
End
Begin VB.CommandButton cmdFind
Caption = "按用户账号查找"
Enabled = 0 'False
Height = 345
Left = 240
TabIndex = 21
Top = 5280
Width = 2175
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关 闭"
Height = 345
Left = 240
TabIndex = 20
Top = 5760
Width = 975
End
Begin VB.CommandButton cmdLookWork
Caption = "查看操作记录"
Enabled = 0 'False
Height = 345
Left = 240
TabIndex = 19
Top = 4800
Width = 2175
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 9
Left = 4080
TabIndex = 18
Top = 4440
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 8
Left = 4080
TabIndex = 17
Top = 3960
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 6
Left = 4080
TabIndex = 16
Top = 3480
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 5
Left = 4080
TabIndex = 15
Top = 3000
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 4
Left = 4080
TabIndex = 14
Top = 2520
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 3
Left = 4080
TabIndex = 13
Top = 2040
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 2
Left = 4080
TabIndex = 12
Top = 1560
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 1
Left = 4080
TabIndex = 11
Top = 1080
Width = 3615
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 300
Index = 0
Left = 4080
TabIndex = 10
Top = 600
Width = 3615
End
Begin VB.ListBox lst
Height = 4020
Left = 240
TabIndex = 0
Top = 600
Width = 2175
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(点一次任意账户后,才能使用查找功能)"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 180
Index = 11
Left = 120
TabIndex = 24
Top = 240
Width = 3525
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "开户日期:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 10
Left = 3120
TabIndex = 23
Top = 5040
Width = 900
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "银行手续员:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 9
Left = 3000
TabIndex = 9
Top = 4560
Width = 1080
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款方式:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 8
Left = 3120
TabIndex = 8
Top = 4080
Width = 900
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "代办人电话:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 6
Left = 3000
TabIndex = 7
Top = 3600
Width = 1080
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户电话:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 5
Left = 3120
TabIndex = 6
Top = 3120
Width = 900
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户住址:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 4
Left = 3120
TabIndex = 5
Top = 2640
Width = 900
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "代办人身份证号:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 3
Left = 2640
TabIndex = 4
Top = 2160
Width = 1440
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户身份证号:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 2
Left = 2880
TabIndex = 3
Top = 1680
Width = 1260
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "代办人姓名:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 1
Left = 3000
TabIndex = 2
Top = 1200
Width = 1080
End
Begin VB.Label lblFQA
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户姓名:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 0
Left = 3120
TabIndex = 1
Top = 720
Width = 900
End
End
Attribute VB_Name = "frmQueryAll"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Dim userID As String
Dim findID As String
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_FINDSTRINGEXACT = &H1A2
Dim rstFind As New Recordset
Private Sub cmdClose_Click()
Unload Me
End Sub
'响应 "查找" 按钮
Private Sub cmdFind_Click()
findID = InputBox("请输入你要查找的ID")
For i = 1 To 2
Dim ll_Rtn As Long, ls_FindString As String
ls_FindString = userID & Chr(0)
ll_Rtn = SendMessage(lst.hwnd, LB_FINDSTRINGEXACT, -1, ByVal ls_FindString)
If ll_Rtn <> -1 Then
lst.selected(ll_Rtn) = True
userID = findID
Else
MsgBox "帐户未找到!"
End If
Next i
End Sub
'响应 "查看操作记录" 按钮
Private Sub cmdLookWork_Click()
On Error Resume Next
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select wdate from " & userID, con, adOpenDynamic, adLockOptimistic
rst.MoveFirst
Do While Not rst.EOF
frmWorkQuery.lst.AddItem (Mid(rst!Wdate, 1, 4) & "年" & Mid(rst!Wdate, 5, 2) & "月" & Mid(rst!Wdate, 7, 2) & "日 " & Mid(rst!Wdate, 9, 2) & "时" & Mid(rst!Wdate, 11, 2) & "分" & Mid(rst!Wdate, 13, 2) & "秒")
rst.MoveNext
Loop
rst.Close
con.Close
frmWorkQuery.userID = userID
frmWorkQuery.Show
End Sub
Private Sub cmdNextSID_Click()
Dim errMove As Boolean
errMove = True
On Error GoTo err2
rstFind.MoveNext
Call selected(rstFind!id)
errMove = False
err2:
If errMove Then
MsgBox "未找到!"
Exit Sub
End If
End Sub
Private Sub cmdSID_Click()
On Error GoTo err3
rstFind.Close
err3:
Dim lookID As String
Dim errFind As Boolean
If txt(11).Text = "" Then
MsgBox "请在右边的文本框中输入你要查找的身份证号"
Exit Sub
End If
lookID = txt(11).Text
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
errFind = True
On Error GoTo err1
rstFind.Open "select * from CConsumers where userStationID='" & lookID & "'", con, adOpenDynamic, adLockOptimistic
lookID = rstFind!id
errFind = False
err1:
If errFind Then
MsgBox "此身份证号未找到!"
Exit Sub
End If
Call selected(lookID)
End Sub
'响应列表
Private Sub lst_Click()
userID = lst.Text
Set rst = New Recordset
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select * from CConsumers where id='" & lst.Text & "'", con, adOpenDynamic, adLockOptimistic
txt(0).Text = rst!userName
txt(1).Text = rst!deputizeName
txt(2).Text = rst!userStationID
txt(3).Text = rst!deputizeStationID
txt(4).Text = rst!userAddress
txt(5).Text = rst!userPhone
txt(6).Text = rst!deputizePhone
txt(8).Text = "活期"
txt(9).Text = rst!procedurePerson
txt(10).Text = Mid(userID, 2, 4) & "年" & Mid(userID, 6, 2) & "月" & Mid(userID, 8, 2) & "日 " & Mid(userID, 10, 2) & "时" & Mid(userID, 12, 2) & "分" & Mid(userID, 14, 2) & "秒"
rst.Close
cmdLookWork.Enabled = True
cmdFind.Enabled = True
con.Close
End Sub
Private Function selected(lookID As String) As Boolean
selected = False
For i = 1 To 2
Dim ll_Rtn As Long, ls_FindString As String
ls_FindString = lookID & Chr(0)
ll_Rtn = SendMessage(lst().hwnd, LB_FINDSTRINGEXACT, -1, ByVal ls_FindString)
If ll_Rtn <> -1 Then
lst().selected(ll_Rtn) = True
selected = True
End If
Next i
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -