📄 addstudbad.frm
字号:
VERSION 5.00
Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
Begin VB.Form addstudbad
Caption = "Form1"
ClientHeight = 6750
ClientLeft = 60
ClientTop = 345
ClientWidth = 10590
Icon = "addstudbad.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 6750
ScaleWidth = 10590
Begin MSACAL.Calendar Calendar1
Height = 2895
Left = 4680
TabIndex = 35
Top = 2400
Width = 4335
_Version = 524288
_ExtentX = 7646
_ExtentY = 5106
_StockProps = 1
BackColor = -2147483633
Year = 2002
Month = 11
Day = 6
DayLength = 0
MonthLength = 0
DayFontColor = 16711680
FirstDay = 2
GridCellEffect = 1
GridFontColor = 16711680
GridLinesColor = 8454143
ShowDateSelectors= -1 'True
ShowDays = -1 'True
ShowHorizontalGrid= -1 'True
ShowTitle = -1 'True
ShowVerticalGrid= -1 'True
TitleFontColor = 10485760
ValueIsNull = 0 'False
BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 8.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "System"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.CommandButton Command4
Caption = "..."
Height = 495
Left = 8400
TabIndex = 34
Top = 1800
Width = 615
End
Begin VB.CommandButton Command3
Caption = "关闭(&C)"
Height = 495
Left = 8760
TabIndex = 33
Top = 5520
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消(&E)"
Height = 495
Left = 8760
TabIndex = 32
Top = 4920
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
Height = 495
Left = 8760
TabIndex = 31
Top = 4320
Width = 1215
End
Begin VB.Frame Frame2
Height = 2175
Left = 8640
TabIndex = 30
Top = 4080
Width = 1455
End
Begin VB.TextBox Text6
Height = 1575
Left = 1080
TabIndex = 22
Top = 4680
Width = 7215
End
Begin VB.ComboBox Combo9
Height = 300
Left = 5280
TabIndex = 18
Top = 1080
Width = 3015
End
Begin VB.TextBox Text5
Height = 495
Left = 5280
TabIndex = 17
Top = 1800
Width = 3015
End
Begin VB.ComboBox Combo6
Height = 300
Left = 3120
TabIndex = 16
Top = 3720
Width = 735
End
Begin VB.ComboBox Combo7
Height = 300
Left = 5160
TabIndex = 15
Top = 3720
Width = 735
End
Begin VB.ComboBox Combo5
Height = 300
Left = 1440
TabIndex = 14
Top = 3720
Width = 735
End
Begin VB.ComboBox Combo4
Height = 300
Left = 7200
TabIndex = 13
Top = 3120
Width = 735
End
Begin VB.ComboBox Combo3
Height = 300
Left = 5160
TabIndex = 12
Top = 3120
Width = 735
End
Begin VB.ComboBox Combo2
Height = 300
Left = 3120
TabIndex = 11
Top = 3120
Width = 735
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1440
TabIndex = 10
Top = 3120
Width = 735
End
Begin VB.Frame Frame1
Caption = "处分级别"
Height = 1695
Left = 360
TabIndex = 9
Top = 2640
Width = 7935
Begin VB.Label Label15
Caption = "开除学籍"
Height = 255
Left = 3840
TabIndex = 29
Top = 1080
Width = 855
End
Begin VB.Label Label14
Caption = "勒令退学"
Height = 255
Left = 1920
TabIndex = 28
Top = 1080
Width = 735
End
Begin VB.Label Label13
Caption = "劝其退学"
Height = 255
Left = 240
TabIndex = 27
Top = 1080
Width = 735
End
Begin VB.Label Label12
Caption = "留校察看"
Height = 375
Left = 5760
TabIndex = 26
Top = 480
Width = 855
End
Begin VB.Label Label11
Caption = "记过"
Height = 375
Left = 3840
TabIndex = 25
Top = 480
Width = 615
End
Begin VB.Label Label10
Caption = "严重警告"
Height = 375
Left = 1920
TabIndex = 24
Top = 480
Width = 735
End
Begin VB.Label Label9
Caption = "警告"
Height = 375
Left = 240
TabIndex = 23
Top = 480
Width = 615
End
End
Begin VB.TextBox Text4
Height = 495
Left = 1080
TabIndex = 3
Top = 1800
Width = 3015
End
Begin VB.TextBox Text3
Height = 495
Left = 1080
TabIndex = 2
Top = 1080
Width = 3015
End
Begin VB.TextBox Text2
Height = 495
Left = 5280
TabIndex = 1
Top = 360
Width = 3015
End
Begin VB.TextBox Text1
Height = 495
Left = 1080
TabIndex = 0
Top = 360
Width = 3015
End
Begin VB.Label Label8
Caption = "日期"
Height = 375
Left = 4200
TabIndex = 21
Top = 1920
Width = 735
End
Begin VB.Label Label7
Caption = "Label7"
Height = 495
Left = 3600
TabIndex = 20
Top = 3360
Width = 1215
End
Begin VB.Label Label6
Caption = "详细描述"
Height = 375
Left = 240
TabIndex = 19
Top = 4560
Width = 1215
End
Begin VB.Label Label5
Caption = "班级"
Height = 495
Left = 240
TabIndex = 8
Top = 1800
Width = 735
End
Begin VB.Label Label4
Caption = "性别"
Height = 495
Left = 4200
TabIndex = 7
Top = 1080
Width = 735
End
Begin VB.Label Label3
Caption = "姓名"
Height = 495
Left = 240
TabIndex = 6
Top = 1080
Width = 735
End
Begin VB.Label Label2
Caption = "学号"
Height = 495
Left = 4200
TabIndex = 5
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "编号"
Height = 495
Left = 240
TabIndex = 4
Top = 360
Width = 615
End
End
Attribute VB_Name = "addstudbad"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Command1.Caption = "确定(&O)" Then
If Not Testtxt(Text1.Text) Then
MsgBox "请输入编号!", 48, "提示"
Text1.SetFocus
Exit Sub
End If
'++++++++++++++++++++++++++++++++++++++++++++++++
If Not Testtxt(Text2.Text) Then
MsgBox "请输入学号!", 48, "提示"
Text2.SetFocus
Exit Sub
End If
If Not Testtxt(Text3.Text) Then
MsgBox "请输入姓名!", 48, "提示"
Text3.SetFocus
Exit Sub
End If
If Not Testtxt(Combo9.Text) Then
MsgBox "请选择性别!", 48, "提示"
Combo6.SetFocus
Exit Sub
End If
'+++++++++++++++++++++++++++++++++++++++++++++++++
txtSQL = "select * from studbad "
Set dream = ExecuteSQL(txtSQL, Msgtext)
dream.MoveFirst
While (dream.EOF = False)
If (dream.Fields(0)) = Trim(Text1.Text) Then
MsgBox "编号已经存在!", 48, "提示"
Exit Sub
Text1.Text = " "
Text1.SetFocus
Else
dream.MoveNext
End If
Wend
dream.AddNew
dream.Fields(0) = Trim(Text1.Text)
dream.Fields(1) = Trim(Text2.Text)
dream.Fields(2) = Trim(Text3.Text)
dream.Fields(3) = Trim(Combo9.Text)
dream.Fields(4) = Trim(Text4.Text)
dream.Fields(5) = Trim(Text5.Text)
dream.Fields(6) = Trim(Combo1.Text)
dream.Fields(7) = Trim(Combo2.Text)
dream.Fields(8) = Trim(Combo3.Text)
dream.Fields(9) = Trim(Combo4.Text)
dream.Fields(10) = Trim(Combo5.Text)
dream.Fields(11) = Trim(Combo6.Text)
dream.Fields(12) = Trim(Combo7.Text)
dream.Fields(13) = Trim(Text6.Text)
dream.UpdateBatch
'=================================================
MsgBox "添加学生处分信息成功!", 48, "提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo6.Text = ""
Combo7.Text = ""
Combo9.Text = ""
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Combo5.Text = ""
Combo6.Text = ""
Combo7.Text = ""
Combo8.Text = ""
Combo9.Text = ""
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Calendar1.Visible = True
End Sub
Private Sub Calendar1_Click()
Text5.Text = Calendar1.Value
Calendar1.Visible = False
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub
Private Sub Form_Load()
Calendar1.Visible = False
addstudbad.Width = 10710
addstudbad.Height = 7155
Combo9.AddItem "男"
Combo9.AddItem "女"
Combo1.AddItem "是"
Combo1.AddItem "否"
Combo2.AddItem "是"
Combo2.AddItem "否"
Combo3.AddItem "是"
Combo3.AddItem "否"
Combo4.AddItem "是"
Combo4.AddItem "否"
Combo5.AddItem "是"
Combo5.AddItem "否"
Combo6.AddItem "是"
Combo6.AddItem "否"
Combo7.AddItem "是"
Combo7.AddItem "否"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -