📄 form8.frm
字号:
VERSION 5.00
Begin VB.Form Form8
BackColor = &H00FF0000&
Caption = "开户"
ClientHeight = 4605
ClientLeft = 4590
ClientTop = 3375
ClientWidth = 6000
LinkTopic = "Form8"
ScaleHeight = 6862.791
ScaleMode = 0 'User
ScaleWidth = 7692.308
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
BackColor = &H00C0FFFF&
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3720
MaskColor = &H00C0FFFF&
Style = 1 'Graphical
TabIndex = 10
Top = 4080
Width = 855
End
Begin VB.CommandButton Command1
BackColor = &H00C0FFFF&
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
Style = 1 'Graphical
TabIndex = 9
Top = 4080
Width = 855
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1680
TabIndex = 8
Top = 2880
Width = 3135
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 7
Top = 2280
Width = 3135
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 6
Top = 1680
Width = 3135
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1680
TabIndex = 5
Top = 1080
Width = 3135
End
Begin VB.Label Label7
BackColor = &H00808080&
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 12
Top = 3480
Width = 3135
End
Begin VB.Label Label6
BackColor = &H00C0FFFF&
Caption = "您的卡号"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 11
Top = 3480
Width = 1215
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 0
X2 = 7692.308
Y1 = 1251.845
Y2 = 1251.845
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 0
X2 = 7692.308
Y1 = 1073.01
Y2 = 1073.01
End
Begin VB.Label Label5
BackColor = &H00C0FFFF&
Caption = "身份证号"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 4
Top = 2880
Width = 1215
End
Begin VB.Label Label4
BackColor = &H00C0FFFF&
Caption = "密码确认"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 3
Top = 2280
Width = 1215
End
Begin VB.Label Label3
BackColor = &H00C0FFFF&
Caption = "密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 2
Top = 1680
Width = 615
End
Begin VB.Label Label2
BackColor = &H00C0FFFF&
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 1
Top = 1080
Width = 975
End
Begin VB.Label Label1
BackColor = &H00C0FFFF&
Caption = "开户"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2280
TabIndex = 0
Top = 120
Width = 975
End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim card As String
Dim cardbehind As Integer
Const cardnumf = "955880880288688" '卡号前15位
Const cardnuml = 1000 '卡号后4位
Private Sub Command1_Click()
Dim eee As String
eee = "select * from yinhang where 开户顺序 in(select max(开户顺序) from yinhang)"
rsstor (eee)
j = rss.Fields("开户顺序")
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then
MsgBox "用户名或密码或身份证号不能为空!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "密码必须为数字"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
ElseIf Len(Text2.Text) <> 6 Then
MsgBox "密码应为6位"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
ElseIf Text2.Text <> Text3.Text Then
MsgBox "两次输入的密码不一致,请重新输入"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
ElseIf Not IsNumeric(Text4.Text) Then
MsgBox "身份证号必须全为数字"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
ElseIf Len(Text4.Text) <> 15 And Len(Text4.Text) <> 18 Then
MsgBox "身份证号必须15位或者18位数字"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
Else
j = j + 1
cardbehind = cardnuml + j
card = cardnumf & cardbehind
Call rsstor("select * from yinhang where 用户名='" & Trim(Text1.Text) & "'")
If rss.BOF And rss.EOF Then '表明在数据库中未找到相同的用户名
rss.AddNew
rss.Fields(0).Value = card
rss.Fields(1).Value = Text1.Text
rss.Fields(2).Value = Text2.Text
rss.Fields(3).Value = 0
rss.Fields(4).Value = Text4.Text
rss.Fields(5).Value = "no"
rss.Fields(6).Value = j
rss.Update
MsgBox "恭喜你申请成功"
Label7.Caption = card
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Command2.SetFocus
Else
MsgBox "对不起,该用户名在本系统中已存在,请另换一个用户名!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
Form1.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -