?? frmaddclassinfo.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmAddclassinfo
Caption = "添加班級(jí)信息"
ClientHeight = 2610
ClientLeft = 45
ClientTop = 345
ClientWidth = 5685
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 2610
ScaleWidth = 5685
Begin VB.ComboBox comboGrade
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 312
Left = 3720
TabIndex = 9
Top = 480
Width = 1692
End
Begin VB.CommandButton Command2
Caption = "取消添加"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 2760
TabIndex = 8
Top = 1920
Width = 1092
End
Begin VB.CommandButton Command1
Caption = "確認(rèn)添加"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 960
TabIndex = 7
Top = 1920
Width = 1092
End
Begin VB.TextBox txtClassroom
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 3720
TabIndex = 6
Top = 1200
Width = 1692
End
Begin VB.TextBox txtDirector
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1200
TabIndex = 4
Top = 1200
Width = 1332
End
Begin VB.TextBox txtClassno
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1200
TabIndex = 1
Top = 480
Width = 1332
End
Begin VB.Label Label4
Caption = "教室:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 2880
TabIndex = 5
Top = 1200
Width = 732
End
Begin VB.Label Label3
Alignment = 2 'Center
Caption = "班主任:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 120
TabIndex = 3
Top = 1200
Width = 972
End
Begin VB.Label Label2
Caption = "年級(jí):"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 2880
TabIndex = 2
Top = 480
Width = 732
End
Begin VB.Label Label1
Caption = "班號(hào):"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 252
Left = 240
TabIndex = 0
Top = 480
Width = 732
End
End
Attribute VB_Name = "frmAddclassinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean '插入=false,修改=true
Public OK As Boolean
Private Sub Command1_Click()
Dim combo As Boolean
' Dim mrc As ADODB.Recordset
' Dim MsgText As String
' Dim txtSQL As String
If Not Testtxt(txtClassno.text) Then
MsgBox "請(qǐng)輸入班號(hào)!", vbOKOnly + vbExclamation, "警告"
txtClassno.SetFocus
Exit Sub
End If
If Not Testtxt(comboGrade.text) Then
MsgBox "請(qǐng)選擇年級(jí)!", vbOKOnly + vbExclamation, "警告"
comboGrade.SetFocus
Exit Sub
End If
If Not Testtxt(txtDirector.text) Then
MsgBox "請(qǐng)輸入班主任姓名!", vbOKOnly + vbExclamation, "警告"
txtDirector.SetFocus
Exit Sub
End If
If Not Testtxt(txtClassroom.text) Then
MsgBox "請(qǐng)輸入教室房間號(hào)!", vbOKOnly + vbExclamation, "警告"
txtClassroom.SetFocus
Exit Sub
End If
If Not IsNumeric(Trim(txtClassno.text)) Then
MsgBox "請(qǐng)輸入數(shù)字!", vbOKOnly + vbExclamation, "警告"
Exit Sub
txtClassno.SetFocus
End If
combo = InCombo(comboGrade.text, comboGrade)
If combo = False Then
Exit Sub
End If
With MyEmp
.class_No = Trim(txtClassno)
.grade = Trim(comboGrade.text)
.director = Trim(txtDirector)
.classroom_No = Trim(txtClassroom)
If Modify = False Then
.Insert
Else
Call .Update(CurEmp.class_No)
End If
End With
OK = True
MsgBox "添加班級(jí)信息成功!", vbOKOnly + vbExclamation, "添加班級(jí)信息"
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub form_load()
comboGrade.AddItem "計(jì)科系99級(jí)"
comboGrade.AddItem "計(jì)科系00級(jí)"
comboGrade.AddItem "計(jì)科系01級(jí)"
comboGrade.AddItem "計(jì)科系02級(jí)"
comboGrade.AddItem "計(jì)科系03級(jí)"
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -