⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmnew.frm

📁 数据库银行管理系统数据库银行管理系统数据库银行管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmnew 
   Caption         =   "开户信息"
   ClientHeight    =   7230
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9960
   LinkTopic       =   "Form1"
   ScaleHeight     =   7230
   ScaleWidth      =   9960
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Check4 
      Caption         =   "女"
      Height          =   855
      Left            =   2760
      TabIndex        =   21
      Top             =   3000
      Width           =   855
   End
   Begin VB.CheckBox Check3 
      Caption         =   "男"
      Height          =   615
      Left            =   1680
      TabIndex        =   20
      Top             =   3120
      Width           =   975
   End
   Begin VB.CheckBox Check2 
      Caption         =   "信用卡"
      Height          =   735
      Left            =   5880
      TabIndex        =   19
      Top             =   4200
      Width           =   1215
   End
   Begin VB.CheckBox Check1 
      Caption         =   "储蓄"
      Height          =   735
      Left            =   4440
      TabIndex        =   18
      Top             =   4200
      Width           =   1335
   End
   Begin VB.TextBox Text6 
      Height          =   495
      Left            =   1800
      TabIndex        =   16
      Top             =   2040
      Width           =   1575
   End
   Begin VB.TextBox Text5 
      Height          =   495
      Left            =   1800
      TabIndex        =   14
      Top             =   1200
      Width           =   1575
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   7320
      Style           =   2  'Dropdown List
      TabIndex        =   12
      Top             =   4320
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   6000
      TabIndex        =   7
      Top             =   3480
      Width           =   2775
   End
   Begin VB.CommandButton Command2 
      Caption         =   "结束操作"
      Height          =   495
      Left            =   4680
      TabIndex        =   9
      Top             =   5760
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认开户"
      Height          =   495
      Left            =   2760
      TabIndex        =   8
      Top             =   5760
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   6000
      MousePointer    =   1  'Arrow
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   2760
      Width           =   2775
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   6000
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1920
      Width           =   2775
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   6000
      TabIndex        =   1
      Top             =   1200
      Width           =   2775
   End
   Begin VB.Label Label9 
      Caption         =   "性别:"
      Height          =   735
      Left            =   120
      TabIndex        =   17
      Top             =   3000
      Width           =   1335
   End
   Begin VB.Label Label8 
      Caption         =   "年龄:"
      Height          =   615
      Left            =   120
      TabIndex        =   15
      Top             =   1920
      Width           =   1335
   End
   Begin VB.Label Label7 
      Caption         =   "姓名 :"
      Height          =   495
      Left            =   120
      TabIndex        =   13
      Top             =   1200
      Width           =   1335
   End
   Begin VB.Label Label6 
      Caption         =   "帐号类型:"
      Height          =   495
      Left            =   2280
      TabIndex        =   11
      Top             =   4320
      Width           =   1935
   End
   Begin VB.Label Label5 
      Caption         =   "请输入帐户存款额:"
      Height          =   495
      Left            =   3960
      TabIndex        =   6
      Top             =   3480
      Width           =   1815
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "银行模拟系统开户界面"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      TabIndex        =   10
      Top             =   240
      Width           =   5415
   End
   Begin VB.Label Label3 
      Caption         =   "请确认密码:"
      Height          =   495
      Left            =   3960
      TabIndex        =   4
      Top             =   2880
      Width           =   1815
   End
   Begin VB.Label Label2 
      Caption         =   "请输入密码:"
      Height          =   375
      Left            =   3960
      TabIndex        =   2
      Top             =   2040
      Width           =   1935
   End
   Begin VB.Label Label1 
      Caption         =   "请输入新建的帐号:"
      Height          =   375
      Left            =   3960
      TabIndex        =   0
      Top             =   1320
      Width           =   1815
   End
End
Attribute VB_Name = "frmnew"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim field As Fields


Private Sub Check1_Click()
Combo1.Visible = True
Combo1.AddItem "活期"
Combo1.AddItem "定期"
Combo1.AddItem "定期一本通"
Combo1.AddItem "定活两便"
Check2.Value = 0 - Unchecked
If Val(Text4.Text) < 10 Then
MsgBox "你的最小存款额不能小于10元", vbOKOnly + vbInformation, "银行系统提示"
Text4.Text = ""
Text4.SetFocus
End If
End Sub

Private Sub Check2_Click()
Check1.Value = 0 - Unchecked
Combo1.Visible = False

If Val(Text4.Text) < 10 Then
MsgBox "你的最小存款额不能小于10元", vbOKOnly + vbInformation, "银行系统提示"
Text4.Text = ""
Text4.SetFocus
End If
End Sub

Private Sub Check3_Click()
Check4.Value = 0
End Sub

Private Sub Check4_Click()
Check3.Value = 0
End Sub

Private Sub Text2_Change()
If Len(Trim(Text1.Text)) <> 6 Then
MsgBox "卡号必须为6位,请重新填写!"
 Text1.Text = ""

 Text1.SetFocus

 Else
 

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 卡号='" & Trim(Text1.Text) & "'"
rss.Open strsql, cn, adOpenKeyset, adLockOptimistic

  Do While Not rss.EOF
 MsgBox "此卡号已存在请更换!"

 Text2.Text = ""
 Text1.SetFocus
   rss.MoveNext
 Loop
 End If
 


End Sub

Private Sub Text4_Change()
If Text3.Text <> Text2.Text Then
MsgBox "你两次的密码输入不一致而导致系统错误!", vbOKOnly + vbInformation, "银行系统提示"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
End If
End Sub

Private Sub Command1_Click()

Call connectDB
adoRS.Open "zhanghu_05_10", adoCon
If Not adoRS Then
adoRS.AddNew
adoRS("姓名") = Text5.Text
adoRS("年龄") = Text6.Text

adoRS("卡号") = Text1.Text
adoRS("密码") = Text2.Text
adoRS("余额") = Text4.Text

If Check3.Value = 1 Then
adoRS("性别") = "男"
ElseIf Check4.Value = 1 Then
adoRS("性别") = "女"
End If
If Check1.Value = 1 Then
adoRS("帐户类型") = "储蓄"
Combo1.Visible = True
adoRS("储蓄类型") = Combo1.Text
ElseIf Check2.Value = 1 Then
adoRS("帐户类型") = "信用卡"
End If

adoRS.Update
adoRS.MoveNext
kaihu.Show


Text3.Text = ""

Text5.Text = ""
Text6.Text = ""
'Check1.Value = 0
'Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Combo1.AddItem ""
End If
End Sub


Private Sub Command2_Click()
Frmmain.Show
Unload Me

End Sub

Private Sub List1_Click()

End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -