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

📄 sycw.frm

📁 本宿舍管理系统采用VB为系统开发平台
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc4"
      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 MSAdodcLib.Adodc Adodc3 
      Height          =   375
      Left            =   4920
      Top             =   840
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc3"
      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 MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   4920
      Top             =   120
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   4920
      Top             =   480
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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         =   -1
      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
End
Attribute VB_Name = "cwck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
If Combo1.Text = "全部" Then
Combo2.Enabled = False
Label8.Caption = Adodc4.Recordset.RecordCount
Else
Combo2.Enabled = True
sql1 = "select * from qinshi where 公寓名称='" & Combo1.Text & "'"
With Adodc2
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql1
.Refresh
End With
Label8.Caption = Adodc2.Recordset.RecordCount
End If
'Label8.Caption = ""
Label2.Caption = ""
Label6.Caption = ""
End Sub

Private Sub Combo2_Click()
provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"
Dim sql1, sql2 As String
If Combo1.Text = "全部" Then
Label2.Caption = Adodc3.Recordset.RecordCount
Label8.Caption = Adodc4.Recordset.RecordCount
Label7.Caption = "所有已经注册寝室"
Else
sql1 = "select count(公寓) from users where 公寓='" & Combo1.Text & "'"
sql2 = "select count(寝室) from qinshi where 公寓名称='" & Combo1.Text & "'"
With Adodc2
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql1
.Refresh
End With
Label2.Caption = Adodc2.Recordset.GetString
With Adodc5
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql2
.Refresh
End With
Label7.Caption = "该公寓已注册寝室"
'Label8.Caption = Adodc5.Recordset.GetString
If Combo2.Text <> "选择床位数" Then
Label6.Caption = Label8.Caption * Combo2.Text - Label2.Caption
End If
End If
End Sub

Private Sub Combo3_Click()
provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"
Dim sql As String
sql = "select * from qinshi where 公寓名称='" & Combo3.Text & "'"
With Adodc6
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql
.Refresh
End With
 Dim X As Integer
X = 0
If Adodc6.Recordset.RecordCount <> 0 Then
Do While X < Adodc6.Recordset.RecordCount
    Combo4.AddItem (Adodc6.Recordset.Fields("寝室"))
    Adodc6.Recordset.MoveNext
    X = X + 1
Loop
End If
End Sub

Private Sub Combo4_Click()
provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"
Dim sql3 As String
sql3 = "select * from users where 公寓='" & Combo3.Text & "'and 寝室='" & Combo4.Text & "'"
With Adodc7
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql3
.Refresh
End With
Label13.Caption = Adodc7.Recordset.RecordCount

Dim X As Integer
X = 0
If Adodc7.Recordset.RecordCount <> 0 Then
Combo5.Clear
Do While X < Adodc7.Recordset.RecordCount
    Combo5.AddItem (Adodc7.Recordset.Fields("姓名"))
    Adodc7.Recordset.MoveNext
    X = X + 1
Loop
Else
 Combo5.Clear
End If
End Sub

Private Sub Command1_Click()
provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"
Dim sql1, sql2 As String
If Combo1.Text = "全部" Then
Label2.Caption = Adodc3.Recordset.RecordCount
Label8.Caption = Adodc4.Recordset.RecordCount
Label7.Caption = "所有已经注册寝室"
Else
sql1 = "select count(公寓) from users where 公寓='" & Combo1.Text & "'"
sql2 = "select count(寝室) from qinshi where 公寓名称='" & Combo1.Text & "'"
With Adodc2
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql1
.Refresh
End With
Label2.Caption = Adodc2.Recordset.GetString
With Adodc5
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdText
.RecordSource = sql2
.Refresh
End With
Label7.Caption = "该公寓已注册寝室"
Label8.Caption = Adodc5.Recordset.GetString
Label6.Caption = Label8.Caption * Combo2.Text - Label2.Caption
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim provider As String
Dim datasource As String

provider = "provider=Microsoft.jet.oledb.4.0"
datasource = "data source=" & App.Path & "\DB.mdb"
With Adodc1
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "gongyu"
.Refresh
End With

With Adodc3
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "users"
.Refresh
End With

With Adodc4
.Mode = adModeReadWrite
.ConnectionString = provider & ";" & datasource
.CommandType = adCmdTable
.RecordSource = "qinshi"
.Refresh
End With
Combo1.AddItem "全部"
Combo1.Text = "全部"
Combo2.AddItem "选择床位数"
Combo2.Text = "选择床位数"
Combo3.AddItem "请选择公寓"
Combo3.Text = "请选择公寓"
Dim J As Integer
J = 1
If Adodc1.Recordset.RecordCount <> 0 Then
Do While J < Adodc1.Recordset.RecordCount
    Combo3.AddItem (Adodc1.Recordset.Fields("公寓名称"))
    Combo1.AddItem (Adodc1.Recordset.Fields("公寓名称"))
    Adodc1.Recordset.MoveNext
    J = J + 1
Loop
End If
Combo2.AddItem "1"
Combo2.AddItem "2"
Combo2.AddItem "4"
Combo2.AddItem "6"
Combo2.AddItem "8"
Combo2.AddItem "12"
If Combo1.Text = "全部" Then
Combo2.Enabled = False
End If
Combo5.Text = "本寝室人员"
End Sub

⌨️ 快捷键说明

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