📄 查询界面.frm
字号:
VERSION 5.00
Begin VB.Form Frmfind
Caption = "查询余额窗口"
ClientHeight = 3840
ClientLeft = 60
ClientTop = 345
ClientWidth = 5700
LinkTopic = "Form5"
ScaleHeight = 3840
ScaleWidth = 5700
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton ComQuit
Caption = "返回界面"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2280
TabIndex = 2
Top = 2760
Width = 1455
End
Begin VB.TextBox TxtUser
Height = 375
Left = 2640
TabIndex = 1
Top = 1560
Width = 2055
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "银行模拟系统——查询界面"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 0
TabIndex = 3
Top = 0
Width = 5775
End
Begin VB.Label Label1
Caption = "您的帐户余额:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 0
Top = 960
Width = 2895
End
End
Attribute VB_Name = "Frmfind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ComQuit_Click()
Unload Me
Frmmain.Show
End Sub
Private Sub Form_Load()
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=B14"
Dim rss As ADODB.Recordset
Set rss = New ADODB.Recordset
strsql = "select * from zhanghu_05_10 where 卡号='" & strr & "'"
rss.Open strsql, cn, adOpenKeyset, adLockOptimistic
TxtUser.Text = rss("余额") & "元"
ErrMsg:
If Err.Number <> 0 Then
MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "出错提示"
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -