quxiao.frm
来自「学生信息管理系统2.0,增加了数据库的恢复和备份」· FRM 代码 · 共 156 行
FRM
156 行
VERSION 5.00
Object = "{CE671F01-259E-40DA-92FE-95803E2ECBB5}#1.0#0"; "SmartXPButton.ocx"
Begin VB.Form quxiao
BackColor = &H00E7DFE7&
Caption = "处分消除"
ClientHeight = 3345
ClientLeft = 60
ClientTop = 450
ClientWidth = 4440
Icon = "quxiao.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3345
ScaleWidth = 4440
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
Height = 375
Left = 2400
TabIndex = 0
Top = 1440
Width = 1695
End
Begin SmartXPButton.XpButton XpButton2
Height = 495
Left = 2640
TabIndex = 1
Top = 2640
Width = 1335
_ExtentX = 2355
_ExtentY = 873
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "取消(&C)"
PictureSmoothBackColor= 15460844
ButtonPicture = "quxiao.frx":0A02
End
Begin SmartXPButton.XpButton XpButton1
Height = 495
Left = 600
TabIndex = 2
Top = 2640
Width = 1335
_ExtentX = 2355
_ExtentY = 873
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "确定(&O)"
PictureSmoothBackColor= 15460844
ButtonPicture = "quxiao.frx":1414
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "处罚记录取消"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000002&
Height = 495
Left = 840
TabIndex = 4
Top = 120
Width = 2895
End
Begin VB.Image Image1
Height = 1740
Left = 240
Picture = "quxiao.frx":1E26
Top = 720
Width = 1380
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "学号:"
Height = 495
Left = 1800
TabIndex = 3
Top = 1560
Width = 495
End
End
Attribute VB_Name = "quxiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myconn As New ADODB.Connection
Dim MyRs As New ADODB.Recordset
Private Sub Form_Load()
Set myconn = New ADODB.Connection
myconn.ConnectionString = "driver={SQL Server};" & _
"server=(local);uid=sa;pwd=;database=student_info"
myconn.Open
'***** 使用Recordset对象的Open方法创建记录集 *****
'MyRs.Open "manager", MyConn, adOpenStatic, adLockOptimistic, adCmdTable
Set MyRs = New ADODB.Recordset
With MyRs
.Source = "PUNISHMENT"
.ActiveConnection = myconn
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open , , , , adCmdTable
End With
End Sub
Private Sub XpButton1_Click()
Dim varmark As Variant
If Len(Trim(Text1.Text)) <> 0 Then
varmark = MyRs.Bookmark
MyRs.Find "STUDENT=" + "'" + Trim(Text1.Text) + "'"
If MyRs.EOF Then
MsgBox "此学生没有被处罚!", vbOKOnly + vbInformation, "提示信息"
Text1.Text = ""
Text1.SetFocus
MyRs.Bookmark = varmark
Else
With MyRs
.Fields("ENABLE") = "F"
.Update
End With
MsgBox "学处罚记录取消信息已添加成功!", vbOKOnly + vbInformation, "提示信息"
Text1.Text = ""
Text1.SetFocus
End If
Else
MsgBox "请输入学生学号!", vbOKOnly + vbExclamation, "错误提示"
End If
End Sub
Private Sub XpButton2_Click()
MyRs.Close
myconn.Close
Unload Me
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?