?? 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 + -