📄 开户.frm
字号:
VERSION 5.00
Begin VB.Form Form6
BackColor = &H00FFC0C0&
Caption = "Form6"
ClientHeight = 5625
ClientLeft = 60
ClientTop = 450
ClientWidth = 8505
LinkTopic = "Form6"
Picture = "开户.frx":0000
ScaleHeight = 5625
ScaleWidth = 8505
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "卡开户界面"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 4095
Left = 1560
TabIndex = 0
Top = 720
Width = 5655
Begin VB.OptionButton Option2
BackColor = &H00FFC0C0&
Caption = "女"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 16
Top = 240
Width = 1695
End
Begin VB.OptionButton Option1
BackColor = &H00FFC0C0&
Caption = "男"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 15
Top = 360
Width = 1575
End
Begin VB.CommandButton Command3
Caption = "开户"
Height = 495
Left = 2880
Picture = "开户.frx":9F51
Style = 1 'Graphical
TabIndex = 14
Top = 3120
Width = 2175
End
Begin VB.TextBox Text5
Height = 495
Left = 2880
TabIndex = 13
Top = 2520
Width = 2175
End
Begin VB.TextBox Text3
Height = 495
Left = 2880
TabIndex = 8
Top = 1920
Width = 2175
End
Begin VB.TextBox Text1
Height = 495
Left = 2880
TabIndex = 7
Top = 720
Width = 2175
End
Begin VB.TextBox Text2
Height = 495
Left = 2880
TabIndex = 6
Top = 1320
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 495
Left = 840
Picture = "开户.frx":12827
Style = 1 'Graphical
TabIndex = 5
Top = 3120
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "姓名"
Height = 495
Index = 3
Left = 840
Picture = "开户.frx":1B0FD
Style = 1 'Graphical
TabIndex = 4
Top = 720
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "身份证"
Height = 495
Index = 2
Left = 840
Picture = "开户.frx":239D3
Style = 1 'Graphical
TabIndex = 3
Top = 1320
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "地址"
Height = 495
Index = 1
Left = 840
Picture = "开户.frx":2C2A9
Style = 1 'Graphical
TabIndex = 2
Top = 1920
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "联系电话"
Height = 495
Index = 0
Left = 840
Picture = "开户.frx":34B7F
Style = 1 'Graphical
TabIndex = 1
Top = 2520
Width = 1575
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Index = 3
Left = 480
TabIndex = 17
Top = 2040
Width = 255
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Index = 2
Left = 480
TabIndex = 12
Top = 1440
Width = 255
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Index = 1
Left = 480
TabIndex = 11
Top = 840
Width = 255
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "*"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 255
Index = 0
Left = 480
TabIndex = 10
Top = 360
Width = 255
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FFC0C0&
Caption = "注:带*为必填"
ForeColor = &H000000FF&
Height = 300
Left = 3720
TabIndex = 9
Top = 3720
Width = 1170
End
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yg6 As String
Public yh6 As String
Public wm As String
Private Sub Command2_Click()
Unload Me
Form20.Show
End Sub
Private Sub Command3_Click()
Dim count As Integer
Dim nowTime As String
Dim ka As String
nowTime = Now
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or (Option1.Value = False And Option2.Value = False) Then
MsgBox "带*为必填项!"
Text1.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "身份证必须为数字"
Text2.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text5.Text) And Text5.Text <> "" Then
MsgBox "电话号必须全为数字"
Text5.SetFocus
Exit Sub
ElseIf Len(Text2.Text) > 20 Then
MsgBox "身份证号必须小于20位"
Exit Sub
Text2.SetFocus
Else
ka = yg6 + Format(nowTime, "yyyy") + Format(nowTime, "mm") + Format(nowTime, "dd") + Format(nowTime, "hh") + Format(nowTime, "nn") + Format(nowTime, "ss")
Call openconn
rs.Open "select * from client_xx053_06 where id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
conn.Execute "insert into client_xx053_06 values('" & Trim(Text2.Text) & "','" & Trim(Text1.Text) & "','" & Trim(Text3.Text) & "','" & Trim(Text5.Text) & "','" & wm & "',1)"
MsgBox "恭喜你申请成功"
MsgBox "你的卡号是:" & ka
conn.Execute "insert into card_xx053_06 values('" & ka & "','222222' ,'" & Trim(Text2.Text) & "',10,0,'" & yh6 & "','" & nowTime & "')"
MsgBox "您的初始密码是:222222"
rs.Close
conn.Close
Unload Me
Form3.Show
Else
conn.Execute "insert into card_xx053_06 values('" & ka & "','222222' ,'" & Trim(Text2.Text) & "',10,0,'" & yh6 & "','" & nowTime & "')"
MsgBox "恭喜你申请成功"
MsgBox "你的卡号是:" & ka
MsgBox "您的初始密码是:222222"
rs.Close
rs.Open "select * from client_xx053_06 where id='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
count = rs!count
count = count + 1
rs.Fields(5) = count
rs.Update
rs.Close
conn.Close
Unload Me
Form3.Show
End If
End If
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
wm = "男"
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
wm = "女"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -