📄 frmfixquery.frm
字号:
VERSION 5.00
Begin VB.Form frmFixQuery
BackColor = &H00404040&
BorderStyle = 1 'Fixed Single
Caption = "定期存款查询"
ClientHeight = 7065
ClientLeft = 45
ClientTop = 435
ClientWidth = 6765
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 7065
ScaleWidth = 6765
Begin VB.CommandButton cmdNextSID
Caption = "下一位"
Height = 345
Left = 5520
TabIndex = 26
Top = 5880
Width = 975
End
Begin VB.TextBox txt
Height = 270
Index = 10
Left = 1920
TabIndex = 25
Top = 5880
Width = 3375
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关 闭"
Height = 345
Left = 5520
TabIndex = 23
Top = 6360
Width = 975
End
Begin VB.CommandButton cmdSID
Caption = "按身份证号查找"
Height = 345
Left = 360
TabIndex = 22
Top = 5880
Width = 1455
End
Begin VB.CommandButton cmdID
Caption = "按帐户号查找"
Height = 345
Left = 360
TabIndex = 21
Top = 6360
Width = 1455
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 9
Left = 3480
TabIndex = 20
Top = 5160
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 8
Left = 3480
TabIndex = 19
Top = 4680
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 7
Left = 3480
TabIndex = 18
Top = 4200
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 6
Left = 3480
TabIndex = 17
Top = 3720
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 5
Left = 3480
TabIndex = 16
Top = 3240
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 4
Left = 3480
TabIndex = 15
Top = 2760
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 3
Left = 3480
TabIndex = 14
Top = 2280
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 2
Left = 3480
TabIndex = 13
Top = 1800
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 1
Left = 3480
TabIndex = 12
Top = 1320
Width = 2775
End
Begin VB.TextBox txt
Enabled = 0 'False
Height = 270
Index = 0
Left = 3480
TabIndex = 11
Top = 840
Width = 2775
End
Begin VB.ListBox lst
Height = 4740
Left = 240
TabIndex = 0
Top = 840
Width = 2055
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 = 3480
TabIndex = 24
Top = 240
Width = 120
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电话:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 13
Left = 2880
TabIndex = 10
Top = 4800
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "住址:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 12
Left = 2880
TabIndex = 9
Top = 5280
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 10
Left = 2880
TabIndex = 8
Top = 960
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "身份证号:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 9
Left = 2520
TabIndex = 7
Top = 1440
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款时间:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 8
Left = 2520
TabIndex = 6
Top = 2400
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "取款时间:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 7
Left = 2520
TabIndex = 5
Top = 3840
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款金额:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 6
Left = 2520
TabIndex = 4
Top = 1920
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存款日期:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 5
Left = 2520
TabIndex = 3
Top = 3360
Width = 900
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "利率:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 4
Left = 2880
TabIndex = 2
Top = 2880
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "经办:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 3
Left = 2880
TabIndex = 1
Top = 4320
Width = 540
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 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 + -