📄 学生成绩添加.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form9
Caption = "Form9"
ClientHeight = 5790
ClientLeft = 60
ClientTop = 450
ClientWidth = 11730
LinkTopic = "Form9"
ScaleHeight = 5790
ScaleWidth = 11730
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 735
Left = 9600
Top = 4560
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 1296
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "取消添加"
Height = 615
Left = 6000
TabIndex = 17
Top = 4680
Width = 2895
End
Begin VB.CommandButton Command1
Caption = "确定添加"
Height = 615
Left = 1680
TabIndex = 16
Top = 4680
Width = 2655
End
Begin VB.TextBox Text1
Height = 735
Index = 0
Left = 3000
TabIndex = 7
Top = 360
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 1
Left = 8280
TabIndex = 6
Top = 360
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 2
Left = 8280
TabIndex = 5
Top = 1440
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 3
Left = 8280
TabIndex = 4
Top = 2400
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 4
Left = 3000
TabIndex = 3
Top = 2400
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 5
Left = 3000
TabIndex = 2
Top = 1320
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 6
Left = 3000
TabIndex = 1
Top = 3480
Width = 2295
End
Begin VB.TextBox Text1
Height = 735
Index = 7
Left = 8280
TabIndex = 0
Top = 3360
Width = 2295
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 0
Left = 600
TabIndex = 15
Top = 480
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 1
Left = 5880
TabIndex = 14
Top = 480
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 2
Left = 5880
TabIndex = 13
Top = 1560
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 3
Left = 5880
TabIndex = 12
Top = 2520
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 4
Left = 600
TabIndex = 11
Top = 2520
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 5
Left = 600
TabIndex = 10
Top = 1440
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 6
Left = 600
TabIndex = 9
Top = 3600
Width = 2175
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Index = 7
Left = 5880
TabIndex = 8
Top = 3480
Width = 2175
End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
For i = 0 To 7
Adodc1.Recordset(i).Value = Text1(i).Text
Next i
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "您添加成功了!!!"
End Sub
Private Sub Command2_Click()
For i = 0 To 7
Text1(i).Text = ""
Next i
Text1(0).SetFocus
End Sub
Private Sub Form_Load()
Me.Caption = "学生成绩添加"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\student1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "chengji"
Adodc1.Refresh
For i = 0 To 7
Label1(i).Caption = Adodc1.Recordset.Fields(i).Name & ":"
Next i
Label1(0).Caption = "学号:"
'Text1(0).SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -