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

📄 form2.frm

📁 用VB来实现学生信息管理系统的界面
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form2"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1440
      TabIndex        =   5
      Top             =   240
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   3360
      TabIndex        =   4
      Top             =   240
      Width           =   735
   End
   Begin VB.Data Data1 
      Caption         =   "0"
      Connect         =   "Access"
      DatabaseName    =   "数据库.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   1560
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   2640
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      DataField       =   "时间"
      DataSource      =   "Data1"
      Height          =   270
      Left            =   2160
      TabIndex        =   3
      Top             =   1440
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      DataField       =   "发证单位"
      DataSource      =   "Data1"
      Height          =   270
      Left            =   2160
      TabIndex        =   2
      Top             =   1800
      Width           =   1455
   End
   Begin VB.TextBox Text4 
      DataField       =   "奖励级别"
      DataSource      =   "Data1"
      Height          =   270
      Left            =   2160
      TabIndex        =   1
      Top             =   2160
      Width           =   1455
   End
   Begin VB.Data Data2 
      Caption         =   "Data2"
      Connect         =   "Access"
      DatabaseName    =   "数据库.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   1440
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "成员"
      Top             =   840
      Visible         =   0   'False
      Width           =   1140
   End
   Begin VB.TextBox Text5 
      Height          =   270
      Left            =   3240
      TabIndex        =   0
      Top             =   960
      Width           =   375
   End
   Begin VB.Label Label1 
      Caption         =   "姓名"
      Height          =   375
      Left            =   600
      TabIndex        =   11
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "所获奖励"
      Height          =   375
      Left            =   600
      TabIndex        =   10
      Top             =   960
      Width           =   1095
   End
   Begin VB.Label Label3 
      Caption         =   "奖励时间"
      Height          =   255
      Left            =   840
      TabIndex        =   9
      Top             =   1440
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "发奖单位"
      Height          =   255
      Left            =   840
      TabIndex        =   8
      Top             =   1800
      Width           =   735
   End
   Begin VB.Label Label5 
      Caption         =   "奖励级别"
      Height          =   255
      Left            =   840
      TabIndex        =   7
      Top             =   2160
      Width           =   855
   End
   Begin VB.Label Label6 
      Caption         =   "总数:"
      Height          =   255
      Left            =   2760
      TabIndex        =   6
      Top             =   960
      Width           =   495
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Data2.Recordset.FindFirst "姓名='" & Trim(Text1) & "'"
  If Data2.Recordset.NoMatch Then
    MsgBox "查无此人!!!"
    Data1.RecordSource = "select * from 奖励记录库 where 1=0"
    Me.Data1.Refresh
    Text5.Text = Me.Data1.Recordset.RecordCount
    Text1.Text = ""
  Else
    id_mark = Data2.Recordset.标识
    Data1.RecordSource = "select * from 奖励记录库 where 标识='" & id_mark & "'"
    Me.Data1.Refresh
    If Data1.Recordset.RecordCount = 0 Then
        Text5.Text = 0
        Data1.Caption = 0
        MsgBox "此人无奖励记录!"
    Else
        Data1.Recordset.MoveLast
        Text5.Text = Data1.Recordset.RecordCount
        Data1.Recordset.MoveFirst
    End If
  End If
End Sub

Private Sub Data1_Reposition()
  Data1.Caption = Data1.Recordset.AbsolutePosition + 1
End Sub

⌨️ 快捷键说明

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