📄 frmadd.frm
字号:
VERSION 5.00
Begin VB.Form frmAdd
BackColor = &H0000FFFF&
BorderStyle = 0 'None
Caption = "学生添加"
ClientHeight = 3195
ClientLeft = 0
ClientTop = 0
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton CmdCancel
Caption = "取消"
Height = 615
Left = 2640
TabIndex = 5
Top = 2400
Width = 1815
End
Begin VB.CommandButton CmdOK
Caption = "确定"
Height = 615
Left = 240
TabIndex = 4
Top = 2400
Width = 1815
End
Begin VB.TextBox TxtName
Height = 495
Left = 2640
TabIndex = 3
Top = 1320
Width = 1815
End
Begin VB.TextBox TxtID
Height = 495
Left = 2640
TabIndex = 2
Top = 120
Width = 1815
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "学生姓名"
Height = 495
Left = 240
TabIndex = 1
Top = 1320
Width = 1815
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "学生编号"
Height = 495
Left = 240
TabIndex = 0
Top = 120
Width = 1815
End
End
Attribute VB_Name = "FrmAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdCancel_Click()
Unload Me
End Sub
Private Sub CmdOK_Click()
Dim dbrs As ADODB.Recordset
Set dbrs = DataEnv.rsStuTable
dbrs.AddNew
dbrs.Fields("StudentID") = TxtID.Text
dbrs.Fields("StudentName") = TxtName.Text
dbrs.Update
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -