form6.frm
来自「本人课程设计做的一个简单的教务辅助管理系统,实现了数据库的一般操作,适合初学者学」· FRM 代码 · 共 515 行 · 第 1/2 页
FRM
515 行
VERSION 5.00
Begin VB.Form 添加教师信息
Caption = "教师基本信息"
ClientHeight = 5790
ClientLeft = 60
ClientTop = 345
ClientWidth = 7770
LinkTopic = "Form5"
ScaleHeight = 5790
ScaleWidth = 7770
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Caption = "基本信息录入"
Height = 4935
Left = 480
TabIndex = 0
Top = 480
Width = 6615
Begin VB.TextBox Text1
Height = 270
Left = 1800
TabIndex = 24
Top = 825
Width = 975
End
Begin VB.TextBox Text2
Height = 270
Left = 4560
TabIndex = 23
Top = 825
Width = 975
End
Begin VB.ComboBox Combo2
Height = 300
Left = 4560
TabIndex = 22
Top = 2865
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 270
Left = 4920
TabIndex = 21
Top = 4320
Width = 975
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 270
Left = 3120
TabIndex = 20
Top = 4320
Width = 975
End
Begin VB.ComboBox Combo3
Height = 300
Left = 1920
TabIndex = 19
Top = 3555
Width = 1215
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1800
TabIndex = 18
Top = 1560
Width = 615
End
Begin VB.TextBox Text6
Height = 270
Left = 2820
TabIndex = 16
Top = 2205
Width = 495
End
Begin VB.TextBox Text7
Height = 270
Left = 3840
TabIndex = 13
Top = 2205
Width = 495
End
Begin VB.TextBox Text8
Height = 270
Left = 1800
TabIndex = 12
Top = 2895
Width = 1215
End
Begin VB.TextBox Text9
Height = 270
Left = 4560
TabIndex = 10
Top = 3585
Width = 1215
End
Begin VB.TextBox Text4
Height = 270
Left = 4560
TabIndex = 2
Top = 1560
Width = 975
End
Begin VB.TextBox Text5
Height = 270
Left = 1800
TabIndex = 1
Top = 2205
Width = 495
End
Begin VB.Label Label1
Caption = "教 师 名"
Height = 255
Index = 8
Left = 3600
TabIndex = 25
Top = 840
Width = 855
End
Begin VB.Label Label6
Caption = " 年"
Height = 255
Index = 0
Left = 2400
TabIndex = 17
Top = 2220
Width = 375
End
Begin VB.Label Label6
Caption = " 日"
Height = 255
Index = 2
Left = 4440
TabIndex = 15
Top = 2213
Width = 375
End
Begin VB.Label Label6
Caption = " 月"
Height = 255
Index = 1
Left = 3360
TabIndex = 14
Top = 2213
Width = 375
End
Begin VB.Label Label1
Caption = "最后学历"
Height = 255
Index = 10
Left = 600
TabIndex = 11
Top = 3600
Width = 855
End
Begin VB.Label Label1
Caption = "毕业院校"
Height = 255
Index = 12
Left = 3600
TabIndex = 9
Top = 3600
Width = 855
End
Begin VB.Label Label1
Caption = "所 在 系"
Height = 255
Index = 1
Left = 600
TabIndex = 8
Top = 2910
Width = 855
End
Begin VB.Label Label1
Caption = "籍 贯"
Height = 255
Index = 2
Left = 3600
TabIndex = 7
Top = 1560
Width = 855
End
Begin VB.Label Label1
Caption = "职 称"
Height = 255
Index = 9
Left = 3600
TabIndex = 6
Top = 2910
Width = 855
End
Begin VB.Label Label1
Caption = "教 师 号"
Height = 255
Index = 3
Left = 600
TabIndex = 5
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "性 别"
Height = 255
Index = 4
Left = 600
TabIndex = 4
Top = 1530
Width = 855
End
Begin VB.Label Label1
Caption = "出生日期"
Height = 255
Index = 5
Left = 600
TabIndex = 3
Top = 2220
Width = 855
End
End
End
Attribute VB_Name = "添加教师信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim day As Integer
Dim month As Integer
Dim year As Integer
Private Sub Combo1_Click()
Text4.Enabled = True
End Sub
Private Sub Combo2_Click()
Combo3.Enabled = True
End Sub
Private Sub Combo3_Click()
Text9.Enabled = True
End Sub
Private Sub Command1_Click()
Set con = New ADODB.Connection
Set rs = New ADODB.Recordset
Set qrs = New ADODB.Recordset
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\教务管理系统.mdb;Persist Security Info=False"
rs.Open "SELECT * FROM 教师基本信息 WHERE 教师编号='" & Trim(Text1.Text) & " '", con, adOpenStatic, adLockOptimistic
If rs.RecordCount > 0 Then
MsgBox "以有这个教师编号!", vbOKOnly + vbExclamation, "警告"
Else
rs.AddNew
rs.Fields(0) = Text1.Text
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?