📄 frmstuadmin.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmStuAdmin
BackColor = &H80000005&
Caption = "学生信息管理"
ClientHeight = 8655
ClientLeft = 60
ClientTop = 240
ClientWidth = 10905
Icon = "frmStuAdmin.frx":0000
MDIChild = -1 'True
ScaleHeight = 8655
ScaleWidth = 10905
WindowState = 2 'Maximized
Begin VB.Frame Frame4
BackColor = &H80000005&
BorderStyle = 0 'None
Height = 8295
Left = 360
TabIndex = 0
Top = 120
Width = 10215
Begin VB.Frame Frame2
BackColor = &H80000005&
Caption = "学生管理(&A)"
Height = 2535
Left = 480
TabIndex = 8
Top = 1800
Width = 9375
Begin VB.CommandButton CmdClear
BackColor = &H80000005&
Caption = "清 除(&C)"
Height = 375
Left = 480
Style = 1 'Graphical
TabIndex = 17
Top = 1680
Width = 1455
End
Begin VB.CommandButton CmdSave
BackColor = &H80000005&
Caption = "存盘/修改(&S)"
Height = 375
Left = 2520
Style = 1 'Graphical
TabIndex = 16
Top = 1680
Width = 1455
End
Begin VB.CommandButton CmdDelete
BackColor = &H80000005&
Caption = "删 除(&D)"
Height = 375
Left = 4680
Style = 1 'Graphical
TabIndex = 15
Top = 1680
Width = 1455
End
Begin VB.CommandButton CmdExit
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "退 出(&X)"
Height = 375
Left = 6840
Style = 1 'Graphical
TabIndex = 14
Top = 1680
Width = 1455
End
Begin VB.TextBox TxtXM
Height = 270
Left = 4035
TabIndex = 13
Text = "TxtXM"
Top = 480
Width = 1815
End
Begin VB.TextBox TxtXH
BackColor = &H8000000B&
Enabled = 0 'False
Height = 270
Left = 1395
TabIndex = 12
Text = "TxtXH"
Top = 480
Width = 1695
End
Begin VB.TextBox TxtZY
Height = 270
Left = 6315
MaxLength = 50
TabIndex = 11
Text = "TxtZY"
Top = 960
Width = 2295
End
Begin VB.ComboBox cobNL
Height = 300
Left = 4155
Style = 2 'Dropdown List
TabIndex = 10
Top = 960
Width = 1095
End
Begin VB.ComboBox cobXB
Height = 300
Left = 1395
Style = 2 'Dropdown List
TabIndex = 9
Top = 960
Width = 1095
End
Begin VB.Label lbZY
BackColor = &H80000005&
Caption = "系别"
Height = 255
Left = 5715
TabIndex = 22
Top = 960
Width = 495
End
Begin VB.Label lbXM
BackColor = &H80000005&
Caption = "姓名"
Height = 255
Left = 3435
TabIndex = 21
Top = 480
Width = 495
End
Begin VB.Label lbNL
BackColor = &H80000005&
Caption = "年龄"
Height = 255
Left = 3480
TabIndex = 20
Top = 960
Width = 495
End
Begin VB.Label lbXB
BackColor = &H80000005&
Caption = "性别"
Height = 255
Left = 555
TabIndex = 19
Top = 960
Width = 615
End
Begin VB.Label lbXH
BackColor = &H80000005&
Caption = "学号"
Height = 255
Left = 555
TabIndex = 18
Top = 480
Width = 495
End
End
Begin VB.Frame Frame1
BackColor = &H80000005&
Caption = "查询(&F)"
Height = 1215
Left = 480
TabIndex = 3
Top = 480
Width = 9375
Begin VB.TextBox TxtKeyword
Enabled = 0 'False
Height = 300
Left = 2280
TabIndex = 6
Top = 600
Width = 2175
End
Begin VB.CommandButton cmdFind
BackColor = &H80000005&
Caption = "查 询(&F)"
Height = 300
Left = 4800
Style = 1 'Graphical
TabIndex = 5
Top = 600
Width = 1455
End
Begin VB.ComboBox cobField
Height = 300
Left = 600
Style = 2 'Dropdown List
TabIndex = 4
Top = 600
Width = 1575
End
Begin VB.Label Label6
BackColor = &H80000005&
Caption = "选择查询方式,输入关键字:"
Height = 255
Left = 600
TabIndex = 7
Top = 240
Width = 2535
End
End
Begin VB.Frame Frame3
BackColor = &H80000005&
Caption = "记录显示(&V)"
Height = 3375
Left = 480
TabIndex = 1
Top = 4560
Width = 9375
Begin VB.ComboBox cobOrd
Height = 300
Left = 6915
Style = 2 'Dropdown List
TabIndex = 24
Top = 3000
Width = 1095
End
Begin VB.ComboBox cobOrdField
Height = 300
Left = 5115
Style = 2 'Dropdown List
TabIndex = 23
Top = 3000
Width = 1575
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 2535
Left = 240
TabIndex = 2
ToolTipText = "学生信息"
Top = 240
Width = 8895
_ExtentX = 15690
_ExtentY = 4471
_Version = 393216
Cols = 5
FixedCols = 0
BackColor = 16777152
ForeColor = 33023
BackColorFixed = 16761024
ForeColorFixed = 16576
BackColorSel = -2147483646
ForeColorSel = 12648447
BackColorBkg = -2147483643
GridColor = 16761024
GridColorFixed = 16761087
HighLight = 2
GridLinesFixed = 1
AllowUserResizing= 2
BorderStyle = 0
Appearance = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label lbOrdWay
BackColor = &H80000005&
Caption = "选择数据的排序方式"
Height = 255
Left = 3195
TabIndex = 26
Top = 3000
Width = 1695
End
Begin VB.Label lbScounts
BackColor = &H80000005&
Caption = "lbScounts"
Height = 255
Left = 240
TabIndex = 25
Top = 3000
Width = 2775
End
End
End
End
Attribute VB_Name = "frmStuAdmin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'frmStuAdmin.frm
Option Explicit
Dim xsjl As New ADODB.Recordset
Dim SQL As String
Dim gRow As Integer
Dim strFieldName As String
Dim StrOrd As String
Private Sub Clear()
strFieldName = ""
StrOrd = ""
TxtXH.Text = ""
TxtXM.Text = ""
TxtZY.Text = ""
'cobXB.Text = ""
' cobNL.Text = ""
' cobField.Text = ""
lbScounts.Caption = ""
End Sub
Private Sub cmdClear_Click()
Call Clear
End Sub
Private Sub CmdDelete_Click()
Dim isOk As Integer
If TxtXH.Text = "" Then
Call showMsg("学号不能为空!", 1)
Exit Sub
End If
isOk = MsgBox("删除该学生将同时删除该学生的选课信息。" & vbCrLf & "您确定要删除么?", vbOKCancel + vbQuestion, "确认操作")
If isOk = vbOK Then
'删除学生信息
SQL = "delete from jc_s where sno='" & TxtXH.Text & "'"
On Error Resume Next
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -