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

📄 formchangestu.frm

📁 学生信息管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   480
      TabIndex        =   30
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Label Label8 
      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            =   6960
      TabIndex        =   29
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label7 
      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            =   6960
      TabIndex        =   28
      Top             =   120
      Width           =   975
   End
   Begin VB.Label Label6 
      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            =   4080
      TabIndex        =   27
      Top             =   480
      Width           =   975
   End
   Begin VB.Label Label5 
      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            =   840
      TabIndex        =   26
      Top             =   840
      Width           =   855
   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            =   6960
      TabIndex        =   25
      Top             =   840
      Width           =   855
   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            =   840
      TabIndex        =   24
      Top             =   480
      Width           =   855
   End
   Begin VB.Label Label2 
      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            =   4200
      TabIndex        =   23
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label1 
      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            =   840
      TabIndex        =   22
      Top             =   120
      Width           =   855
   End
   Begin VB.Label Label30 
      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        =   21
      Top             =   3000
      Width           =   855
   End
End
Attribute VB_Name = "FormChangestu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Mrc As ADODB.Recordset
Dim txtSQL As String
Dim Msgtext As String
Private Sub Command1_Click()
    If Not IsNumeric(Text1.Text) Then
        MsgBox "学号输入有误!", vbOKOnly + vbExclamation, "错误"
        Text1.SetFocus
        Exit Sub
    End If
        If Text5.Text = "" Then
        MsgBox "姓名不可为空!", vbOKOnly + vbExclamation, "错误"
        Exit Sub
        Text5.SetFocus
    End If
     If Text2.Text = "" Then
        MsgBox "系别不可为空!", vbOKOnly + vbExclamation, "错误"
        Exit Sub
        Text2.SetFocus
    End If
     If Text3.Text = "" Then
        MsgBox "专业不可为空!", vbOKOnly + vbExclamation, "错误"
        Exit Sub
        Text3.SetFocus
    End If
     If Text4.Text = "" Then
        MsgBox "班号不可为空!", vbOKOnly + vbExclamation, "错误"
        Exit Sub
        Text4.SetFocus
    End If
    txtSQL = "delete from 基本信息 where 学号='" & Trim(Text1) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    txtSQL = "select * from 基本信息"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    Mrc.AddNew
    Mrc.Fields(0) = Trim(Text1)
    Mrc.Fields(1) = Trim(Text2)
    Mrc.Fields(2) = Trim(Text3)
    Mrc.Fields(3) = Trim(Text4)
    Mrc.Fields(4) = Trim(Text5)
    Mrc.Fields(5) = Trim(Text6)
    Mrc.Fields(6) = Trim(Text7)
    Mrc.Fields(7) = Trim(Text8)
    Mrc.Fields(8) = Trim(Text9)
    Mrc.Fields(9) = Trim(Text10)
    Mrc.Fields(10) = Trim(Text11)
    Mrc.Fields(11) = Trim(Text12)
    Mrc.Fields(12) = Trim(Text13)
    Mrc.Fields(13) = Trim(Text14)
    Mrc.Fields(14) = Trim(Text15)
    Mrc.Fields(15) = Trim(Text16)
    Mrc.Fields(16) = Trim(Text17)
    Mrc.Fields(17) = Trim(Text18)
    Mrc.Update
    Mrc.Close
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
    Text9.Text = ""
    Text10.Text = ""
    Text11.Text = "1982-10-13"
    Text12.Text = ""
    Text13.Text = ""
    Text14.Text = ""
    Text15.Text = ""
    Text16.Text = ""
    Text17.Text = ""
    Text18.Text = ""
    MsgBox "信息修改成功!", vbOKOnly, "提示"
    ShowData
End Sub
Private Sub ShowData()
    Dim txSQL As String
    Dim Mrcc As ADODB.Recordset
    txSQL = "select * from 基本信息"
    Set Mrcc = ExecuteSQL(txSQL, Msgtext)
        With MSFlexGrid1
        .ColWidth(0) = 2000
        .ColWidth(1) = 1200
        .ColWidth(2) = 2500
        .ColWidth(3) = 1200
        .ColWidth(4) = 1200
        .ColWidth(5) = 1000
        .ColWidth(6) = 1500
        .ColWidth(7) = 1200
        .ColWidth(8) = 1200
        .ColWidth(9) = 1200
        .ColWidth(10) = 2000
        .ColWidth(11) = 3000
        .ColWidth(12) = 1200
        .ColWidth(13) = 2000
        .ColWidth(14) = 1200
        .ColWidth(15) = 3000
        .ColWidth(16) = 3000
        .ColWidth(17) = 2000
        .TextMatrix(0, 0) = "学号"
        .TextMatrix(0, 1) = "系名"
        .TextMatrix(0, 2) = "专业"
        .TextMatrix(0, 3) = "班号"
        .TextMatrix(0, 4) = "姓名"
        .TextMatrix(0, 5) = "性别"
        .TextMatrix(0, 6) = "民族"
        .TextMatrix(0, 7) = "曾用名"
        .TextMatrix(0, 8) = "政治面貌"
        .TextMatrix(0, 9) = "本人成分"
        .TextMatrix(0, 10) = "出生日期"
        .TextMatrix(0, 11) = "考生来源"
        .TextMatrix(0, 12) = "家庭出身"
        .TextMatrix(0, 13) = "家庭电话"
        .TextMatrix(0, 14) = "家庭邮编"
        .TextMatrix(0, 15) = "籍贯"
        .TextMatrix(0, 16) = "家庭住址"
        .TextMatrix(0, 17) = "备注"
        .Rows = 1
        Do While Not Mrcc.EOF
            .Rows = .Rows + 1
            For i = 0 To Mrcc.Fields.Count - 1
                .TextMatrix(.Rows - 1, i) = Mrcc.Fields(i) & ""
            Next i
            Mrcc.MoveNext
        Loop
    End With
    Mrcc.Close
End Sub

Private Sub Command2_Click()
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
    Text9.Text = ""
    Text10.Text = ""
    Text11.Text = ""
    Text12.Text = ""
    Text13.Text = ""
    Text14.Text = ""
    Text15.Text = ""
    Text16.Text = ""
    Text17.Text = ""
    Text18.Text = ""
End Sub

Private Sub Command3_Click()
    txtSQL = "delete from 基本信息 where 学号='" & Trim(Text1) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
    Text9.Text = ""
    Text10.Text = ""
    Text11.Text = ""
    Text12.Text = ""
    Text13.Text = ""
    Text14.Text = ""
    Text15.Text = ""
    Text16.Text = ""
    Text17.Text = ""
    Text18.Text = ""
    MsgBox "基本信息已经删除!", vbOKOnly, "警告"
    ShowData
End Sub

Private Sub Form_Load()
    ShowData
End Sub

Private Sub MSFlexGrid1_Click()
    Text1 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0))
    Text2 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 1))
    Text3 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 2))
    Text4 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 3))
    Text5 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 4))
    Text6 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 5))
    Text7 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 6))
    Text8 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 7))
    Text9 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 8))
    Text10 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 9))
    Text11 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 10))
    Text12 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 11))
    Text13 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 12))
    Text14 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 13))
    Text15 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 14))
    Text16 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 15))
    Text17 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 16))
    Text18 = Trim(MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 17))
End Sub

⌨️ 快捷键说明

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