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

📄 form3.frm

📁 此为一学生档案管理系统。学生档案管理系统是典型的信息管理系统(MIS),其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面。
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form3 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "学生状况管理"
   ClientHeight    =   5190
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6585
   Icon            =   "Form3.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5190
   ScaleWidth      =   6585
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame2 
      Caption         =   "查询条件:"
      Height          =   1215
      Left            =   2160
      TabIndex        =   5
      Top             =   240
      Width           =   4095
      Begin VB.CommandButton Command2 
         Caption         =   "关闭"
         Height          =   375
         Left            =   3000
         TabIndex        =   8
         Top             =   480
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Enabled         =   0   'False
         Height          =   375
         Left            =   2040
         TabIndex        =   7
         Top             =   480
         Width           =   855
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   480
         Width           =   1575
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   2640
      Top             =   600
      Width           =   2775
      _ExtentX        =   4895
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   0
      Connect         =   ""
      OLEDBString     =   ""
      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.Frame Frame1 
      Caption         =   "查询类型:"
      Height          =   1215
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   1815
      Begin VB.OptionButton Option1 
         Caption         =   " 学号"
         Height          =   255
         Index           =   0
         Left            =   360
         TabIndex        =   4
         Top             =   360
         Width           =   1215
      End
      Begin VB.OptionButton Option1 
         Caption         =   " 姓名"
         Height          =   255
         Index           =   1
         Left            =   360
         TabIndex        =   3
         Top             =   720
         Width           =   1215
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "查询结果:"
      Height          =   3375
      Left            =   240
      TabIndex        =   0
      Top             =   1560
      Width           =   6015
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   2775
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   5535
         _ExtentX        =   9763
         _ExtentY        =   4895
         _Version        =   393216
         Enabled         =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
Dim str As String

If Option1(0).Value = True Then

str = "select * from data where 学号 =  " & Val(Text1.Text)
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
'recnum = rs.RecordCount
 '  If recnum = 0 Then
   '   MsgBox "数据库无此记录", , "系统提示"
  ' Exit Sub
   'End If
Set DataGrid1.DataSource = Adodc1
    DataGrid1.Refresh
Else
   ' If Adodc1.Recordset.RecordCount = 0 Then
    '  MsgBox "数据库无此记录", , "系统提示"
   ' Exit Sub
    'End If
str = "select * from data where 姓名 LIKE '" & Text1.Text & "%'"
'MsgBox str
SQL = str
Adodc1.RecordSource = SQL
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End If
End Sub


Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\data.MDe;Persist Security Info=False"
Adodc1.CommandType = adCmdText
End Sub

Private Sub Option1_Click(Index As Integer)
Command1.Enabled = True
End Sub

⌨️ 快捷键说明

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