📄 frmcoursemsg.frm
字号:
VERSION 5.00
Begin VB.Form frmCourseMsg
BorderStyle = 1 'Fixed Single
Caption = "课程信息"
ClientHeight = 2775
ClientLeft = 4350
ClientTop = 4275
ClientWidth = 5310
Icon = "frmCourseMsg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2775
ScaleWidth = 5310
Begin VB.TextBox Text5
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1800
TabIndex = 9
Top = 1440
Width = 3375
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3480
TabIndex = 11
Top = 2160
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
Height = 375
Left = 1560
TabIndex = 10
Top = 2160
Width = 1575
End
Begin VB.TextBox Text4
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3600
TabIndex = 7
Top = 720
Width = 1575
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 5
Top = 720
Width = 1335
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 1
Top = 120
Width = 1335
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3600
TabIndex = 3
Top = 120
Width = 1575
End
Begin VB.Label Label5
Caption = "任课教师(F1):"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 8
Top = 1440
Width = 1455
End
Begin VB.Label Label4
Caption = "学分:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2640
TabIndex = 6
Top = 720
Width = 735
End
Begin VB.Label Label3
Caption = "学时:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 720
Width = 735
End
Begin VB.Label Label1
Caption = "课程名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 0
Top = 120
Width = 735
End
Begin VB.Label Label2
Caption = "课程号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2640
TabIndex = 2
Top = 120
Width = 735
End
End
Attribute VB_Name = "frmCourseMsg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public rsCourse As New ADODB.Recordset
Public TeaNO As String
Dim sql As String
Dim sqlX As String
Private Sub Command1_Click()
On Error GoTo DoError
sql = "insert into course values('" + Text2.text + "','" + Text1.text + "','" + Text5.text + "','" + Text3.text + "','" + Text4.text + "')"
cn.exeSQL sql, rsCourse
Unload Me
frmCourse.rsStudent.Requery
Exit Sub
DoError:
MsgBox "请先查询记录[" + Str(err.Number) + "]" + err.Description, vbOKOnly + vbInformation, "错误"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
sqlX = "select teano,teaname from teacher"
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 112 Then
frmSelect.ShowIfo Text5, sqlX
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -