📄 frmfixquery.frm
字号:
VERSION 5.00
Begin VB.Form frmFixQuery
BackColor = &H80000007&
Caption = "Form1"
ClientHeight = 6840
ClientLeft = 60
ClientTop = 345
ClientWidth = 7065
LinkTopic = "Form1"
ScaleHeight = 6840
ScaleWidth = 7065
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox lst
Height = 4740
Left = 360
TabIndex = 15
Top = 720
Width = 2055
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 0
Left = 3600
TabIndex = 14
Top = 720
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 1
Left = 3600
TabIndex = 13
Top = 1200
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 2
Left = 3600
TabIndex = 12
Top = 1680
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 3
Left = 3600
TabIndex = 11
Top = 2160
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 4
Left = 3600
TabIndex = 10
Top = 2640
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 5
Left = 3600
TabIndex = 9
Top = 3120
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 6
Left = 3600
TabIndex = 8
Top = 3600
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 7
Left = 3600
TabIndex = 7
Top = 4080
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 8
Left = 3600
TabIndex = 6
Top = 4560
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 9
Left = 3600
TabIndex = 5
Top = 5040
Width = 2775
End
Begin VB.CommandButton cmdID
Caption = "按帐户号查找"
Height = 345
Left = 480
TabIndex = 4
Top = 6240
Width = 1455
End
Begin VB.CommandButton cmdSID
Caption = "按身份证号查找"
Height = 345
Left = 480
TabIndex = 3
Top = 5760
Width = 1455
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关 闭"
Height = 345
Left = 5640
TabIndex = 2
Top = 6240
Width = 975
End
Begin VB.TextBox txt
Height = 270
Index = 10
Left = 2040
TabIndex = 1
Top = 5760
Width = 3375
End
Begin VB.CommandButton cmdNextSID
Caption = "下一位"
Height = 345
Left = 5640
TabIndex = 0
Top = 5760
Width = 975
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "经办:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 3
Left = 3000
TabIndex = 26
Top = 4200
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "利率:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 4
Left = 3000
TabIndex = 25
Top = 2760
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款日期:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 5
Left = 2640
TabIndex = 24
Top = 3240
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款金额:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 6
Left = 2640
TabIndex = 23
Top = 1800
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "取款时间:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 7
Left = 2640
TabIndex = 22
Top = 3720
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款时间:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 8
Left = 2640
TabIndex = 21
Top = 2280
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "身份证号:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 9
Left = 2640
TabIndex = 20
Top = 1320
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 10
Left = 3000
TabIndex = 19
Top = 840
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "住址:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 12
Left = 3000
TabIndex = 18
Top = 5160
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电话:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 13
Left = 3000
TabIndex = 17
Top = 4680
Width = 540
End
Begin VB.Label lbl
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Index = 0
Left = 3600
TabIndex = 16
Top = 120
Width = 120
End
End
Attribute VB_Name = "frmFixQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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 rst As New Recordset
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdID_Click()
Dim lookID As String
lookID = InputBox("请输入你要查找的ID")
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
End If
Next i
End Sub
Private Sub cmdNextSID_Click()
Dim errMove As Boolean
errMove = True
On Error GoTo err2
rst.MoveNext
Call selected(rst!id)
errMove = False
err2:
If errMove Then
MsgBox "未找到!"
Exit Sub
End If
End Sub
Private Sub cmdSID_Click()
On Error GoTo err3
rst.Close
err3:
Dim lookID As String
Dim errFind As Boolean
If txt(10).Text = "" Then
MsgBox "请在右边的文本框中输入你要查找的身份证号"
Exit Sub
End If
lookID = txt(10).Text
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
errFind = True
On Error GoTo err1
rst.Open "select * from FConsumers where stationID='" & lookID & "'", con, adOpenDynamic, adLockOptimistic
lookID = rst!id
errFind = False
err1:
If errFind Then
MsgBox "此身份证号未找到!"
Exit Sub
End If
Call selected(lookID)
End Sub
Private Sub Form_Load()
End Sub
Private Sub lst_Click()
Dim rst As New Recordset
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select * from FConsumers where id='" & lst().Text & "'", con, adOpenDynamic, adLockOptimistic
txt(0).Text = rst!name
txt(1).Text = rst!stationID
txt(2).Text = rst!money
txt(3).Text = rst!passTime
txt(4).Text = rst!FAccrual
txt(5).Text = Mid(lst().Text, 2, 4) & "年" & Mid(lst().Text, 6, 2) & "月" & Mid(lst().Text, 8, 2) & "日 " & Mid(lst().Text, 10, 2) & ":" & Mid(lst().Text, 12, 2) & ":" & Mid(lst().Text, 14, 2)
If rst!be = 1 Then
txt(6).Text = "NULL"
lbl(0).Caption = "此账户未取款"
Else
txt(6).Text = rst!fetchDate
lbl(0).Caption = "此账户已取款"
End If
txt(7).Text = rst!procedurePerson
txt(8).Text = rst!phone
txt(9).Text = rst!address
rst.Close
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 + -