⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formchange.frm

📁 学生信息管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FormChange 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "学籍变动"
   ClientHeight    =   3675
   ClientLeft      =   6300
   ClientTop       =   3840
   ClientWidth     =   5700
   Icon            =   "FormChange.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3675
   ScaleWidth      =   5700
   Begin VB.Frame Frame2 
      Caption         =   "查询"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3495
      Left            =   120
      TabIndex        =   12
      Top             =   120
      Width           =   5535
      Begin VB.CommandButton Command5 
         Caption         =   "查询"
         Height          =   495
         Left            =   360
         TabIndex        =   7
         Top             =   2880
         Width           =   1215
      End
      Begin VB.CommandButton Command4 
         Caption         =   "取消"
         Height          =   495
         Left            =   2160
         TabIndex        =   8
         Top             =   2880
         Width           =   1215
      End
      Begin VB.CommandButton Command3 
         Caption         =   "打印"
         Enabled         =   0   'False
         Height          =   495
         Left            =   3960
         TabIndex        =   9
         Top             =   2880
         Width           =   1215
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1560
         TabIndex        =   6
         Top             =   480
         Width           =   1935
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   1575
         Left            =   120
         TabIndex        =   14
         Top             =   1080
         Width           =   5175
         _ExtentX        =   9128
         _ExtentY        =   2778
         _Version        =   393216
         Cols            =   3
         BackColor       =   16777215
         BackColorBkg    =   16777215
         Appearance      =   0
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "学号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   13
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "添加"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3495
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5535
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   2280
         TabIndex        =   1
         Top             =   240
         Width           =   1935
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "FormChange.frx":058A
         Left            =   2280
         List            =   "FormChange.frx":0597
         TabIndex        =   2
         Top             =   720
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         Height          =   975
         Left            =   240
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   3
         Top             =   1680
         Width           =   4935
      End
      Begin VB.CommandButton Command1 
         Caption         =   "登 记"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   600
         TabIndex        =   4
         Top             =   2880
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取 消"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   3240
         TabIndex        =   5
         Top             =   2880
         Width           =   1335
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "学号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1440
         TabIndex        =   15
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "学籍变动原因:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   720
         Width           =   2055
      End
      Begin VB.Label Label2 
         Caption         =   "1.退学请注明退学的原因。  2.转学请注明是转入还是转出。 3.降级请注明降级的原因和降到哪个班。"
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   240
         TabIndex        =   10
         Top             =   1200
         Width           =   4935
      End
   End
End
Attribute VB_Name = "FormChange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Mrc As ADODB.Recordset
Dim Msgtext As String
Dim txtSQL As String
Private Sub Command1_Click()
    If Not IsNumeric(Text3) Then
      MsgBox "学号输入有误!", vbOKOnly + vbExclamation, "提示"
      Text3.SetFocus
      Exit Sub
    End If
    txtSQL = "select * from 基本信息 where 学号='" & Trim(Text3.Text) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    If Mrc.EOF = True Then
        MsgBox "不存在此学号!", vbOKOnly + vbExclamation, "提示"
        Text3.SetFocus
        Exit Sub
    End If
    Mrc.Close
    txtSQL = "select * from 学籍变动 where 学号='" & Trim(Text3.Text) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    If Mrc.EOF = False Then
        MsgBox "学生的记录已存在!", vbOKOnly + vbExclamation, "提示"
        msg = MsgBox("是否替换!", vbYesNo, "提示")
        If msg = vbYes Then
            ChangeADD
            MsgBox "添加成功!", vbOKOnly, "提示"
            Text1.Text = ""
            Text3.Text = ""
            Combo1.Text = ""
            Exit Sub
        Else
            Text3.SetFocus
            Exit Sub
        End If
    End If
    ChangeADD
    MsgBox "添加成功!", vbOKOnly, "提示"
    Text1.Text = ""
    Text3.Text = ""
    Combo1.Text = ""
End Sub
Private Sub ChangeADD()
            Dim Mrrcc As ADODB.Recordset
            Dim txxtSQL As String
            txxtSQL = "delete from 学籍变动 where 学号='" & Trim(Text3.Text) & "'"
            Set Mrrcc = ExecuteSQL(txxtSQL, Msgtext)
            txxtSQL = "select * from 学籍变动"
            Set Mrrcc = ExecuteSQL(txxtSQL, Msgtext)
            Mrrcc.AddNew
            Mrrcc.Fields(0) = Trim(Text3.Text)
            Mrrcc.Fields(1) = Trim(Combo1.Text)
            Mrrcc.Fields(2) = Trim(Text1.Text)
            Mrrcc.Update
            Mrrcc.Close
End Sub

Private Sub Command4_Click()
    Text2.Text = ""
End Sub

Private Sub Command5_Click()
   If Not IsNumeric(Text2) Then
      MsgBox "学号输入有误!", vbOKOnly + vbExclamation, "提示"
      Text2.SetFocus
      Exit Sub
    End If
    txtSQL = "select * from 学籍变动 where 学号='" & Trim(Text2) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    If Mrc.EOF = True Then
        MsgBox "无此学生记录!", vbOKOnly + vbExclamation, "提示"
        Text2.SetFocus
        Exit Sub
    End If
    MSFlexGrid1.ColWidth(0) = 2000
    MSFlexGrid1.ColWidth(1) = 1200
    MSFlexGrid1.ColWidth(2) = 3000
    MSFlexGrid1.TextMatrix(0, 0) = "学号"
    MSFlexGrid1.TextMatrix(0, 1) = "学籍变动类型"
    MSFlexGrid1.TextMatrix(0, 2) = "备注"
    MSFlexGrid1.Rows = 1
        Do While Not Mrc.EOF
            MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
            For i = 0 To Mrc.Fields.Count - 1
                MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, i) = Mrc.Fields(i) & ""
            Next i
            Mrc.MoveNext
        Loop
    Mrc.Close
End Sub

Private Sub Form_Load()
    ShowData
End Sub
Private Sub ShowData()
    Dim txSQL As String
    Dim Mrcc As ADODB.Recordset
    txSQL = "select * from 学籍变动"
   Set Mrcc = ExecuteSQL(txSQL, Msgtext)
    MSFlexGrid1.ColWidth(0) = 2000
    MSFlexGrid1.ColWidth(1) = 1200
    MSFlexGrid1.ColWidth(2) = 3000
    MSFlexGrid1.TextMatrix(0, 0) = "学号"
    MSFlexGrid1.TextMatrix(0, 1) = "学籍变动类型"
    MSFlexGrid1.TextMatrix(0, 2) = "备注"
    MSFlexGrid1.Rows = 1
        Do While Not Mrcc.EOF
           MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
            For i = 0 To Mrcc.Fields.Count - 1
                MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, i) = Mrcc.Fields(i) & ""
            Next i
            Mrcc.MoveNext
        Loop
    Mrcc.Close
End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -