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

📄 xuexiao.frm

📁 学校管理系统 V1.0 正式企业版是一款面向中小型企业、个体私营企业
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmXueXiao 
   BackColor       =   &H00FFC0C0&
   Caption         =   "学校资料"
   ClientHeight    =   3720
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4710
   LinkTopic       =   "Form1"
   ScaleHeight     =   3720
   ScaleWidth      =   4710
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      TabIndex        =   7
      Top             =   3240
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存"
      Height          =   375
      Left            =   1200
      TabIndex        =   6
      Top             =   3240
      Width           =   855
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "学校资料设置"
      Height          =   3015
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   4215
      Begin VB.TextBox Text7 
         Height          =   270
         Left            =   1080
         TabIndex        =   16
         Top             =   2520
         Width           =   3015
      End
      Begin VB.TextBox Text6 
         Height          =   270
         Left            =   1080
         TabIndex        =   14
         Top             =   2160
         Width           =   3015
      End
      Begin VB.TextBox Text5 
         Height          =   270
         Left            =   1080
         TabIndex        =   12
         Top             =   1800
         Width           =   3015
      End
      Begin VB.TextBox Text4 
         Height          =   270
         Left            =   1080
         TabIndex        =   11
         Top             =   1440
         Width           =   3015
      End
      Begin VB.TextBox Text3 
         Height          =   270
         Left            =   1080
         TabIndex        =   10
         Top             =   1080
         Width           =   3015
      End
      Begin VB.TextBox Text2 
         Height          =   270
         Left            =   1080
         TabIndex        =   9
         Top             =   720
         Width           =   3015
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1080
         TabIndex        =   8
         Top             =   360
         Width           =   3015
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "电子邮件:"
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   2520
         Width           =   975
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "网    址:"
         Height          =   255
         Left            =   120
         TabIndex        =   13
         Top             =   2160
         Width           =   975
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "学校地址:"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "法人代表:"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "邮政编码:"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "联系电话:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "学校名称:"
         Height          =   255
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   975
      End
   End
End
Attribute VB_Name = "frmXueXiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODb.Connection
Dim rs As New ADODb.Recordset
Dim strSql As String

Private Sub Command1_Click()

rs.Fields("学校名称") = Text1.Text
rs.Fields("法人代表") = Text2.Text
rs.Fields("联系电话") = Text3.Text
rs.Fields("邮政编码") = Text4.Text
rs.Fields("学校地址") = Text5.Text
rs.Fields("网址") = Text6.Text
rs.Fields("电子邮件") = Text7.Text
rs.Update
MsgBox "保存资料成功!"
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()

Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2

DBpath = App.Path + "\database\school.mdb"
strSql = "provider=Microsoft.Jet.oledb.4.0;data source=" & DBpath & ";Jet OLEDB:Database Password=" & pwd & ";"
conn.Open strSql

strSql = "Select * from [学校资料]"
rs.Open strSql, conn, adOpenKeyset, adLockPessimistic

Text1.Text = rs.Fields("学校名称")
Text2.Text = rs.Fields("法人代表")
Text3.Text = rs.Fields("联系电话")
Text4.Text = rs.Fields("邮政编码")
Text5.Text = rs.Fields("学校地址")
Text6.Text = rs.Fields("网址")
 Text7.Text = rs.Fields("电子邮件")

End Sub

Private Sub Form_Unload(Cancel As Integer)
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
End Sub

⌨️ 快捷键说明

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