📄 form5.frm
字号:
VERSION 5.00
Begin VB.Form Form3
Caption = "Form3"
ClientHeight = 3975
ClientLeft = 60
ClientTop = 420
ClientWidth = 6510
LinkTopic = "Form3"
ScaleHeight = 3975
ScaleWidth = 6510
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdedit
Caption = "修改"
Height = 615
Left = 3480
TabIndex = 8
Top = 2880
Width = 975
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "E:\15\学生成绩档案.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 4800
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "系统用户"
Top = 2400
Width = 1380
End
Begin VB.TextBox Text1
DataField = "用户名"
DataSource = "Data1"
Height = 615
Left = 2400
TabIndex = 4
Top = 1200
Width = 2295
End
Begin VB.TextBox Text2
DataField = "密码"
DataSource = "Data1"
Height = 615
IMEMode = 3 'DISABLE
Left = 2400
PasswordChar = "*"
TabIndex = 3
Top = 2040
Width = 2295
End
Begin VB.CommandButton Command1
Caption = "取消"
Height = 615
Left = 5040
TabIndex = 2
Top = 2880
Width = 975
End
Begin VB.CommandButton cmddelete
Caption = "删除"
Height = 615
Left = 2040
TabIndex = 1
Top = 2880
Width = 975
End
Begin VB.CommandButton cmdadd
Caption = "添加"
Height = 615
Left = 480
TabIndex = 0
Top = 2880
Width = 1095
End
Begin VB.Label Label3
Caption = "---在此处添加删除用户---"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1680
TabIndex = 7
Top = 240
Width = 4215
End
Begin VB.Label Label2
Caption = "系统密码:"
Height = 615
Left = 1080
TabIndex = 6
Top = 2040
Width = 1215
End
Begin VB.Label Label1
Caption = "普通用户名:"
Height = 495
Left = 1080
TabIndex = 5
Top = 1320
Width = 1335
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click()
On Error Resume Next
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast
Me.Cmdedit.Caption = "保存"
Me.cmddelete.Enabled = False
Me.Cmdadd.Enabled = False
Exit Sub
End Sub
Private Sub cmddelete_Click()
On Error Resume Next
Data1.Recordset.Delete
If Not Data1.Recordset.EOF Then
Data1.Recordset.MoveNext
Else
Data1.Recordset.MoveLast
End If
If Me.Cmdedit.Caption = "保存" Then
Me.Cmdedit.Caption = "修改"
Me.cmddelete.Enabled = True
Me.Cmdadd.Enabled = True
Data1.Recordset.Updata
End If
Exit Sub
End Sub
Private Sub cmdedit_Click()
On Error Resume Next
Data1.Recordset.Update
Me.Cmdedit.Caption = "修改"
Me.cmddelete.Enabled = True
Me.Cmdadd.Enabled = True
Data1.Recordset.Edit
Data1.Recordset.Update
Exit Sub
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -