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

📄 form9.frm

📁 PB学生管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form9 
   Caption         =   "成绩录入"
   ClientHeight    =   4785
   ClientLeft      =   4590
   ClientTop       =   4245
   ClientWidth     =   6090
   LinkTopic       =   "Form9"
   ScaleHeight     =   4785
   ScaleWidth      =   6090
   Begin VB.Frame Frame1 
      Caption         =   "必须填写"
      Height          =   4455
      Left            =   360
      TabIndex        =   4
      Top             =   120
      Width           =   3735
      Begin VB.TextBox Text5 
         DataField       =   "课程名"
         DataSource      =   "Adodc1"
         Height          =   495
         Left            =   1080
         TabIndex        =   14
         Top             =   1920
         Width           =   1455
      End
      Begin VB.TextBox Text1 
         DataField       =   "学号"
         DataSource      =   "Adodc1"
         Height          =   495
         Left            =   1080
         TabIndex        =   8
         Top             =   240
         Width           =   1575
      End
      Begin VB.TextBox Text2 
         DataField       =   "课程号"
         DataSource      =   "Adodc1"
         Height          =   495
         Left            =   1080
         TabIndex        =   7
         Top             =   1080
         Width           =   1455
      End
      Begin VB.TextBox Text3 
         DataField       =   "成绩"
         DataSource      =   "Adodc1"
         Height          =   495
         Left            =   1080
         TabIndex        =   6
         Top             =   2640
         Width           =   975
      End
      Begin VB.TextBox Text4 
         DataField       =   "学分"
         DataSource      =   "Adodc1"
         Height          =   495
         Left            =   1080
         TabIndex        =   5
         Top             =   3480
         Width           =   975
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   615
         Left            =   2280
         Top             =   3360
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   1085
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   2
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生管理"
         OLEDBString     =   "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生管理"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "成绩表"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "课程名"
         Height          =   180
         Left            =   360
         TabIndex        =   13
         Top             =   2040
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "学号"
         Height          =   180
         Left            =   480
         TabIndex        =   12
         Top             =   360
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "课程号"
         Height          =   180
         Left            =   360
         TabIndex        =   11
         Top             =   1200
         Width           =   540
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "成绩"
         Height          =   180
         Left            =   480
         TabIndex        =   10
         Top             =   2760
         Width           =   360
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "学分"
         Height          =   180
         Left            =   480
         TabIndex        =   9
         Top             =   3600
         Width           =   360
      End
   End
   Begin VB.CommandButton Command4 
      Caption         =   "删除"
      Height          =   615
      Left            =   4320
      TabIndex        =   3
      Top             =   240
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "重置"
      Height          =   615
      Left            =   4320
      TabIndex        =   2
      Top             =   1080
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   615
      Left            =   4320
      TabIndex        =   1
      Top             =   3000
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "提交"
      Height          =   615
      Left            =   4320
      TabIndex        =   0
      Top             =   2040
      Width           =   975
   End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
    If Trim(Text1.Text) <> 0 And Trim(Text2.Text) <> 0 And Trim(Text3.Text) <> 0 Then
        With Adodc1.Recordset
            .Fields("课程号") = Trim(Text2.Text)
            .Fields("学号") = Trim(Text1.Text)
            .Fields("成绩") = Trim(Text3.Text)
            .Fields("学分") = Trim(Text4.Text)
            .Fields("课程名") = Trim(Text5.Text)
        End With
            Adodc1.Recordset.Update
            Command1.Enabled = False
            Command3.Enabled = True
    Else
        MsgBox "数据不足!!"
    End If
End Sub

Private Sub Command2_Click()
    
    Form5.Show
    Unload Me
End Sub
Private Sub Command3_Click()
    Adodc1.Recordset.AddNew
    Command1.Enabled = True
    Command4.Enabled = False
    Command3.Enabled = True
End Sub


⌨️ 快捷键说明

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