📄 creat.frm
字号:
VERSION 5.00
Begin VB.Form creat
Caption = "新开户"
ClientHeight = 3795
ClientLeft = 60
ClientTop = 450
ClientWidth = 4770
LinkTopic = "Form1"
ScaleHeight = 3795
ScaleWidth = 4770
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command2
Caption = "提交"
Height = 495
Left = 720
TabIndex = 12
Top = 2880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "返回"
Height = 495
Left = 2760
TabIndex = 0
Top = 2880
Width = 1215
End
Begin VB.TextBox Text5
Height = 375
Left = 1920
TabIndex = 10
Top = 2280
Width = 2535
End
Begin VB.TextBox Text4
Height = 405
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 9
Top = 1680
Width = 2535
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 8
Top = 1200
Width = 2535
End
Begin VB.TextBox Text2
Height = 375
Left = 1920
TabIndex = 4
Top = 720
Width = 2535
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 2
Top = 240
Width = 2535
End
Begin VB.Label Label6
Caption = "友情提示:帐号必须为12位数字,密码为6-10位数字"
ForeColor = &H8000000D&
Height = 375
Left = 240
TabIndex = 11
Top = 3480
Width = 4335
End
Begin VB.Label Label5
Caption = "设定帐户金额:"
Height = 375
Left = 120
TabIndex = 7
Top = 2280
Width = 1575
End
Begin VB.Label Label4
Caption = "请再次输入密码:"
Height = 375
Left = 120
TabIndex = 6
Top = 1800
Width = 1455
End
Begin VB.Label Label3
Caption = "请输入密码:"
Height = 255
Left = 120
TabIndex = 5
Top = 1320
Width = 1575
End
Begin VB.Label Label2
Caption = "请输入您的用户名:"
Height = 375
Left = 120
TabIndex = 3
Top = 840
Width = 1695
End
Begin VB.Label Label1
Caption = "请输入您申请的帐号:"
Height = 375
Left = 120
TabIndex = 1
Top = 360
Width = 1815
End
End
Attribute VB_Name = "creat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Unload Me
Login.Show
End Sub
Private Sub Command2_Click()
If Not (IsNumeric(Text1.Text)) Or Len(Text1.Text) <> 6 Then
MsgBox "帐号不能为空,且必须为6位数字", vbOKOnly + vbInformation, "请输入帐号"
Text1.Text = ""
Text1.SetFocus
Exit Sub
ElseIf Text2.Text = "" Then
MsgBox "请填写您的用户名", vbOKOnly + vbExclamation, "请输入用户名"
Text2.SetFocus
Exit Sub
ElseIf Not (IsNumeric(Text3.Text)) Or Len(Text3.Text) < 6 Or Len(Text3.Text) > 10 Then
MsgBox "密码必须由6至10位的纯数字组成", vbOKOnly + vbInformation, "请输入密码"
Text3.Text = ""
Text3.SetFocus
Exit Sub
ElseIf Text4.Text <> Text3.Text Then
MsgBox "您输入的两次密码不一致,请重新输入", vbOKOnly + vbInformation, "请重新输入密码"
Text3.Text = ""
Text4.Text = ""
Text3.SetFocus
Exit Sub
ElseIf Not (IsNumeric(Text5.Text)) Or Text5.Text = "" Then
MsgBox "帐户金额必须为数字", vbOKOnly + vbInformation, "请输入帐户金额"
Text5.Text = ""
Text5.SetFocus
Exit Sub
End If
Call connectDB
adoRS.Open "银行表", adoCon
If Not adoRS Then
adoRS.AddNew
adoRS("帐号") = Text1.Text
adoRS("用户名") = Text2.Text
adoRS("密码") = Text3.Text
adoRS("余额") = Text5.Text
adoRS.Update
adoRS.MoveNext
MsgBox "开户成功!请您妥善保管好您的卡号和密码!", vbOKOnly + vbExclamation, "开户成功"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -