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

📄 form1.frm

📁 很好的学生档案管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form1 
   Caption         =   "学生档案管理系统"
   ClientHeight    =   5760
   ClientLeft      =   2355
   ClientTop       =   2130
   ClientWidth     =   7545
   LinkTopic       =   "Form1"
   Picture         =   "Form1.frx":0000
   ScaleHeight     =   5760
   ScaleWidth      =   7545
   Begin VB.TextBox Text7 
      BackColor       =   &H00008000&
      Height          =   375
      Left            =   4680
      TabIndex        =   20
      Top             =   1200
      Width           =   1815
   End
   Begin VB.CommandButton Command7 
      Height          =   375
      Left            =   5880
      Picture         =   "Form1.frx":0442
      Style           =   1  'Graphical
      TabIndex        =   18
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command6 
      Caption         =   "删除"
      Height          =   375
      Left            =   5040
      TabIndex        =   17
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command5 
      Caption         =   "修改"
      Height          =   375
      Left            =   4200
      TabIndex        =   16
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command4 
      Caption         =   "更新"
      Height          =   375
      Left            =   3360
      TabIndex        =   15
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "查找"
      DownPicture     =   "Form1.frx":0884
      Height          =   375
      Left            =   2520
      Picture         =   "Form1.frx":0B8E
      TabIndex        =   14
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "添加"
      Height          =   375
      Left            =   1680
      Picture         =   "Form1.frx":0FD0
      TabIndex        =   13
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Height          =   375
      Left            =   840
      MouseIcon       =   "Form1.frx":1412
      MousePointer    =   4  'Icon
      Picture         =   "Form1.frx":1854
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   4440
      Width           =   855
   End
   Begin VB.TextBox Text6 
      BackColor       =   &H00008000&
      DataField       =   "csdate"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   4680
      TabIndex        =   11
      Top             =   2160
      Width           =   2055
   End
   Begin VB.TextBox Text5 
      BackColor       =   &H00008000&
      DataField       =   "adress"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   4560
      TabIndex        =   9
      Top             =   3360
      Width           =   2415
   End
   Begin VB.TextBox Text4 
      BackColor       =   &H00008000&
      DataField       =   "telephon"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1440
      TabIndex        =   8
      Top             =   3360
      Width           =   1695
   End
   Begin VB.TextBox Text3 
      BackColor       =   &H00008000&
      DataField       =   "sex"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1440
      TabIndex        =   7
      Top             =   2160
      Width           =   735
   End
   Begin VB.TextBox Text2 
      BackColor       =   &H00008000&
      DataField       =   "name"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1440
      TabIndex        =   6
      Top             =   1200
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00008000&
      DataField       =   "class"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1440
      TabIndex        =   5
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "学号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   3480
      TabIndex        =   19
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "出生日期:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   3480
      TabIndex        =   10
      Top             =   2160
      Width           =   1455
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "家庭住址:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   3480
      TabIndex        =   4
      Top             =   3360
      Width           =   1215
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   360
      TabIndex        =   3
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "联系电话:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   360
      TabIndex        =   2
      Top             =   3360
      Width           =   1215
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "性别:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   2160
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "班级:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
   Begin VB.Image Image1 
      Height          =   5895
      Left            =   0
      Picture         =   "Form1.frx":1C96
      Stretch         =   -1  'True
      Top             =   -120
      Width           =   7575
   End
   Begin VB.Menu file 
      Caption         =   "文件(&f)"
      WindowList      =   -1  'True
      Begin VB.Menu xsda 
         Caption         =   "学生成绩管理系统"
      End
      Begin VB.Menu jsjxgl 
         Caption         =   "教师教学管理系统"
      End
      Begin VB.Menu jsgzgl 
         Caption         =   "教师工资管理系统"
      End
      Begin VB.Menu ex 
         Caption         =   "退出(&x)"
      End
   End
   Begin VB.Menu edit 
      Caption         =   "编辑(&e)"
      Begin VB.Menu add 
         Caption         =   "添加"
      End
      Begin VB.Menu del 
         Caption         =   "删除"
      End
   End
   Begin VB.Menu end 
      Caption         =   "返回"
      Begin VB.Menu exit 
         Caption         =   "返回"
      End
   End
   Begin VB.Menu tj 
      Caption         =   "添加新用户"
      Begin VB.Menu tj1 
         Caption         =   "添加"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim da As Recordset

Private Sub add_Click()
  newclass = Text1.Text
  newname = Text2.Text
  newsex = Text3.Text
  newcsdate = Text6.Text
  newtelephon = Text4.Text
  newadress = Text5.Text
  newnumber = Text7.Text
  With da
  .AddNew
  !Class = LCase(newclass)
  !Name = LCase(newname)
  !sex = LCase(newsex)
  !csdate = LCase(newcsdate)
  !telephon = LCase(newtelephon)
  !adress = LCase(newadress)
  !Number = LCase(newnumber)
  .Update
  End With
  'MsgBox (newName & "was added to the address book")
  If MsgBox("是否添加下一条记录!", vbOKCancel) = vbOK Then
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
Else
    GoTo ine
End If
ine:
End Sub

Private Sub Command1_Click()
  On Error Resume Next
  da.MovePrevious
  Text1 = da.Fields("class")
  Text2 = da.Fields("name")
  Text3 = da.Fields("sex")
  Text4 = da.Fields("telephon")
  Text5 = da.Fields("adress")
  Text6 = da.Fields("csdate")
  Text7 = da.Fields("number")
End Sub

Private Sub Command2_Click()
  newclass = Text1.Text
  newname = Text2.Text
  newsex = Text3.Text
  newcsdate = Text6.Text
  newtelephon = Text4.Text
  newadress = Text5.Text
  newnumber = Text7.Text
  With da
  .AddNew
  !Class = LCase(newclass)
  !Name = LCase(newname)
  !sex = LCase(newsex)
  !csdate = LCase(newcsdate)
  !telephon = LCase(newtelephon)
  !adress = LCase(newadress)
  !Number = LCase(newnumber)
  .Update
  End With
  'MsgBox (newName & "was added to the address book")
  If MsgBox("是否添加下一条记录!", vbOKCancel) = vbOK Then
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
Else
    GoTo ine
End If
ine:
End Sub

Private Sub Command3_Click()

Set da = db.OpenRecordset("select * from da")
numberquery = InputBox("请输入您所查找的人的学号:", "查询")
If MsgBox("请您确定的确要查询此人吗!", 6) <> 1 Then
  Exit Sub
End If
  
Do Until da.EOF
If da.Fields("number") Like "*" & LCase(numberquery) & "*" Then
  Text1 = da.Fields("class")
  Text2 = da.Fields("name")
  Text3 = da.Fields("sex")
  Text4 = da.Fields("telephon")
  Text5 = da.Fields("adress")
  Text6 = da.Fields("csdate")
  Text7 = da.Fields("number")
  Exit Sub
Else
  da.MoveNext
End If
  Loop
End Sub

Private Sub Command4_Click()
 da.MoveFirst
 Text1 = da.Fields("class")
 Text2 = da.Fields("name")
 Text3 = da.Fields("sex")
 Text4 = da.Fields("telephon")
 Text5 = da.Fields("adress")
 Text6 = da.Fields("csdate")
 Text7 = da.Fields("number")
End Sub

Private Sub Command5_Click()
  If MsgBox("是否修改!", vbOKCancel + vbExclamation, "警告!") = vbOK Then
   newclass = Text1.Text
   newname = Text2.Text
   newsex = Text3.Text
   newtelephon = Text4.Text
   newadress = Text5.Text
   newcsdate = Text6.Text
   newnumber = Text7.Text
 With da
  .AddNew
  !Class = LCase(newclass)
  !Name = LCase(newname)
  !sex = LCase(newsex)
  !telephon = LCase(newtelephon)
  !adress = LCase(newadress)
  !csdate = LCase(newcsdate)
  !Number = LCase(newnumber)
  .Update
 End With
 Else
  Exit Sub
 End If
End Sub

Private Sub Command6_Click()
 Set da = db.OpenRecordset("select * from da where da.name")
  da.Delete
  da.MoveNext
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
  Text4.Text = ""
  Text5.Text = ""
  Text6.Text = ""
  Text7.Text = ""
End Sub

Private Sub Command7_Click()
On Error Resume Next
 da.MoveNext
 Text1 = da.Fields("class")
 Text2 = da.Fields("name")
 Text3 = da.Fields("sex")
 Text6 = da.Fields("csdate")
 Text4 = da.Fields("telephon")
 Text5 = da.Fields("adress")
 Text7 = da.Fields("number")
End Sub

Private Sub del_Click()
  Set da = db.OpenRecordset("select * from da where da.name")
  da.Delete
  da.MoveNext
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
  Text4.Text = ""
  Text5.Text = ""
  Text6.Text = ""
  Text7.Text = ""
End Sub

Private Sub exit_Click()
   Me.Hide
   frmSplash.Show
End Sub

Private Sub Form_Load()
  Set db = OpenDatabase(App.Path & "\学生档案管理数据库")
  Set da = db.OpenRecordset("da")
  If da.EOF Then
    MsgBox "please add someone to the databse"
  Else
    da.MoveFirst
    Text1 = da.Fields("class")
    Text2 = da.Fields("name")
    Text3 = da.Fields("sex")
    Text4 = da.Fields("telephon")
    Text5 = da.Fields("adress")
    Text6 = da.Fields("csdate")
    Text7 = da.Fields("number")
  End If

End Sub




Private Sub jsgzgl_Click()
     Form3.Show
End Sub

Private Sub jsjxgl_Click()
  Form2.Show
End Sub


Private Sub tj1_Click()
  Form5.Show
End Sub

Private Sub xsda_Click()
  
  Form4.Show
End Sub
Private Sub Form_Resize()
    Form1.Height = 6450
    Form1.Width = 7665
    Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub

⌨️ 快捷键说明

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