📄 班级添加.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form12
Caption = "Form12"
ClientHeight = 3870
ClientLeft = 60
ClientTop = 450
ClientWidth = 5100
LinkTopic = "Form12"
ScaleHeight = 3870
ScaleWidth = 5100
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 735
Left = 7800
Top = 1560
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_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 = 3000
TabIndex = 7
Top = 2880
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定添加"
Height = 615
Left = 1080
TabIndex = 6
Top = 2880
Width = 1095
End
Begin VB.TextBox Text1
Height = 495
Index = 0
Left = 2040
TabIndex = 2
Top = 360
Width = 2295
End
Begin VB.TextBox Text1
Height = 495
Index = 1
Left = 2040
TabIndex = 1
Top = 1200
Width = 2295
End
Begin VB.TextBox Text1
Height = 495
Index = 2
Left = 2040
TabIndex = 0
Top = 2040
Width = 2295
End
Begin VB.Label Label1
Caption = "Label1"
Height = 495
Index = 0
Left = 720
TabIndex = 5
Top = 360
Width = 1695
End
Begin VB.Label Label1
Caption = "Label1"
Height = 495
Index = 1
Left = 720
TabIndex = 4
Top = 1200
Width = 1695
End
Begin VB.Label Label1
Caption = "Label1"
Height = 495
Index = 2
Left = 720
TabIndex = 3
Top = 2160
Width = 1695
End
End
Attribute VB_Name = "Form12"
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 2
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 2
Text1(i).Text = ""
Next i
Text1(0).SetFocus
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\student1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "banji"
Adodc1.Refresh
Me.Caption = "班级添加"
For i = 0 To 2
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 + -