📄 bcdeleteuserform.frm
字号:
VERSION 5.00
Begin VB.Form BCDeleteUserform
Caption = "消户"
ClientHeight = 6675
ClientLeft = 3060
ClientTop = 3345
ClientWidth = 6645
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6675
ScaleWidth = 6645
ShowInTaskbar = 0 'False
WindowState = 2 'Maximized
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 9360
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 720
Width = 1140
End
Begin VB.CommandButton Command4
Caption = "最后一条"
Height = 495
Left = 4920
TabIndex = 17
Top = 4320
Width = 855
End
Begin VB.CommandButton Command3
Caption = "〉》"
Height = 495
Left = 3480
TabIndex = 16
Top = 4320
Width = 855
End
Begin VB.CommandButton Command2
Caption = "《〈"
Height = 495
Left = 2040
TabIndex = 15
Top = 4320
Width = 855
End
Begin VB.CommandButton Command1
Caption = "第一条"
Height = 495
Left = 720
TabIndex = 14
Top = 4320
Width = 855
End
Begin VB.TextBox txtValue
Height = 375
Index = 5
Left = 2400
TabIndex = 13
Top = 3480
Width = 2415
End
Begin VB.TextBox txtValue
Height = 375
Index = 4
Left = 2400
TabIndex = 12
Top = 2880
Width = 2415
End
Begin VB.TextBox txtValue
Height = 375
Index = 3
Left = 2400
TabIndex = 11
Top = 2280
Width = 2415
End
Begin VB.TextBox txtValue
Height = 375
Index = 2
Left = 2400
TabIndex = 10
Top = 1680
Width = 2415
End
Begin VB.TextBox txtValue
Height = 375
Index = 1
Left = 2400
TabIndex = 9
Top = 1080
Width = 2415
End
Begin VB.TextBox txtValue
Height = 375
Index = 0
Left = 2400
TabIndex = 8
Top = 480
Width = 2415
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
Height = 495
Left = 3720
TabIndex = 1
Top = 5280
Width = 1575
End
Begin VB.CommandButton cmdDeleteUser
Caption = "删除用户"
Height = 495
Left = 1080
TabIndex = 0
Top = 5280
Width = 1575
End
Begin VB.Label lblField
Caption = "住址"
Height = 375
Index = 5
Left = 1200
TabIndex = 7
Top = 3480
Width = 855
End
Begin VB.Label lblField
Caption = "联系电话"
Height = 375
Index = 4
Left = 1200
TabIndex = 6
Top = 2880
Width = 855
End
Begin VB.Label lblField
Caption = "身份证号"
Height = 375
Index = 3
Left = 1200
TabIndex = 5
Top = 2280
Width = 855
End
Begin VB.Label lblField
Caption = "姓名"
Height = 375
Index = 2
Left = 1200
TabIndex = 4
Top = 1680
Width = 855
End
Begin VB.Label lblField
Caption = "卡号"
Height = 375
Index = 1
Left = 1200
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.Label lblField
Caption = "帐号ID"
Height = 375
Index = 0
Left = 1200
TabIndex = 2
Top = 480
Width = 855
End
End
Attribute VB_Name = "BCDeleteUserform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Me.Hide
End Sub
Private Sub cmdDeleteUser_Click()
If MsgBox("真的删除吗?", vbYesNo) = vbYes Then
Data1.Recordset.Delete
MsgBox "已经成功删除!"
Data1.Refresh
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End If
End Sub
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End Sub
Private Sub Command2_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End Sub
Private Sub Command3_Click()
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End Sub
Private Sub Command4_Click()
Data1.Recordset.MoveLast
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\简易银行卡管理系统.mdb"
Data1.RecordSource = "用户表"
Data1.Refresh
txtValue(0).Text = Data1.Recordset.Fields("帐号ID")
txtValue(1).Text = Data1.Recordset.Fields("卡号")
txtValue(2).Text = Data1.Recordset.Fields("姓名")
txtValue(3).Text = Data1.Recordset.Fields("身份证号")
txtValue(4).Text = Data1.Recordset.Fields("联系电话")
txtValue(5).Text = Data1.Recordset.Fields("住址")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -