📄 queryaccount.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form queryclerk1
Caption = "查询银行用户信息"
ClientHeight = 7815
ClientLeft = 60
ClientTop = 345
ClientWidth = 9495
LinkTopic = "Form1"
ScaleHeight = 7815
ScaleWidth = 9495
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 0
Visible = 0 'False
Width = 2160
_ExtentX = 3810
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from clerk"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "queryaccount.frx":0000
Height = 3135
Left = 720
TabIndex = 7
Top = 1200
Width = 8175
_ExtentX = 14420
_ExtentY = 5530
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 5
BeginProperty Column00
DataField = "Cname"
Caption = "姓名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "ID"
Caption = "卡号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "Caddress"
Caption = "地址"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "Cphone"
Caption = "电话号码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "CpeopleID"
Caption = "身份证号码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
BeginProperty Column02
EndProperty
BeginProperty Column03
EndProperty
BeginProperty Column04
ColumnAllowSizing= 0 'False
EndProperty
EndProperty
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 5160
TabIndex = 6
Top = 6360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2280
TabIndex = 5
Top = 6360
Width = 1095
End
Begin VB.TextBox Text2
Height = 270
Left = 2640
TabIndex = 4
Top = 5520
Width = 2535
End
Begin VB.TextBox Text1
Height = 270
Left = 2640
TabIndex = 3
Top = 4920
Width = 2535
End
Begin VB.OptionButton Option2
Caption = "按身份证号查询:"
Height = 495
Left = 600
TabIndex = 2
Top = 5400
Width = 1815
End
Begin VB.OptionButton Option1
Caption = "按卡号查询:"
Height = 495
Left = 600
TabIndex = 1
Top = 4800
Width = 1575
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "查询银行职员信息"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2520
TabIndex = 0
Top = 360
Width = 3375
End
End
Attribute VB_Name = "queryclerk1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim str As String
Dim input1 As Boolean
Dim input2 As Boolean
input1 = False
input2 = False
str = "select * from clerk"
Set cn = New adodb.Connection
Dim rst As Recordset
Set rst = New Recordset
'Dim dat1 As Date
'Dim dat2 As Date
'Dim lastmoney As Double
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
cn.Open
rst.Open str, cn, adOpenDynamic, adLockOptimistic
''''''''''''''''''''''''''
'查找此卡号
'''''''''''''''''''''''''
If Option1.Value And Option2.Value Then
MsgBox "请选择查找方法!"
rs.Close
cn.Close
Exit Sub
End If
rst.MoveFirst
If Option1.Value = True Then
Do While Not rst.EOF
If Trim(rst!ID) = Text1.Text Then
input1 = True
GoTo AAA
End If
rst.MoveNext
Loop
Else
Do While Not rst.EOF
If Trim(rst!ID) = Text2.Text Then
input2 = True
GoTo AAA
End If
rst.MoveNext
Loop
End If
AAA:
If input1 = True Or input2 = True Then
queryclerkre.Text1(0).Text = Trim(rst!Cname)
queryclerkre.Text1(1).Text = Trim(rst!ID)
queryclerkre.Text1(2).Text = Trim(rst!CpeopleID)
queryclerkre.Text1(3).Text = Trim(rst!Caddress)
queryclerkre.Text1(4).Text = Trim(rst!Cphone)
rst.Close
cn.Close
queryclerkre.Show
Exit Sub
Else
MsgBox "查无此帐号!请重新输入!"
rst.Close
cn.Close
End If
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text2.Enabled = False
End If
End Sub
Private Sub Option2_Click()
If Option1.Value = True Then
Text1.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -