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

📄 form8.frm

📁 这个是一个图书管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form8 
   Caption         =   "借书"
   ClientHeight    =   6630
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9720
   LinkTopic       =   "Form8"
   ScaleHeight     =   6630
   ScaleWidth      =   9720
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   375
      Left            =   7800
      Top             =   4800
      Width           =   1815
      _ExtentX        =   3201
      _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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from jyxx"
      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            =   7800
      Top             =   240
      Width           =   1815
      _ExtentX        =   3201
      _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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from sjxx"
      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          =   495
      Left            =   720
      Top             =   5280
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   873
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\图书管理系统\db1.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from dzxx"
      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.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   5400
      TabIndex        =   19
      Top             =   4560
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   1560
      TabIndex        =   18
      Top             =   4560
      Width           =   1335
   End
   Begin VB.Frame Frame2 
      Caption         =   "读者信息"
      Height          =   1575
      Left            =   600
      TabIndex        =   15
      Top             =   2400
      Width           =   7215
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   2520
         TabIndex        =   21
         Text            =   "Combo2"
         Top             =   840
         Width           =   1935
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   2520
         TabIndex        =   20
         Text            =   "Combo1"
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label16 
         Caption         =   "读者姓名"
         Height          =   495
         Left            =   1680
         TabIndex        =   17
         Top             =   960
         Width           =   1695
      End
      Begin VB.Label Label15 
         Caption         =   "读者编号"
         Height          =   495
         Left            =   1680
         TabIndex        =   16
         Top             =   240
         Width           =   1575
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "书籍信息"
      Height          =   2175
      Left            =   600
      TabIndex        =   0
      Top             =   0
      Width           =   7215
      Begin VB.Label Label14 
         Caption         =   "Label14"
         Height          =   375
         Left            =   4200
         TabIndex        =   14
         Top             =   1560
         Width           =   1215
      End
      Begin VB.Label Label13 
         Caption         =   "Label13"
         Height          =   375
         Left            =   1080
         TabIndex        =   13
         Top             =   1680
         Width           =   1095
      End
      Begin VB.Label Label12 
         Caption         =   "Label12"
         Height          =   375
         Left            =   3960
         TabIndex        =   12
         Top             =   840
         Width           =   1335
      End
      Begin VB.Label Label11 
         Caption         =   "Label11"
         Height          =   375
         Left            =   720
         TabIndex        =   11
         Top             =   1200
         Width           =   1215
      End
      Begin VB.Label Label10 
         Caption         =   "Label10"
         Height          =   375
         Left            =   3840
         TabIndex        =   10
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label9 
         Caption         =   "Label9"
         Height          =   375
         Left            =   720
         TabIndex        =   9
         Top             =   720
         Width           =   1575
      End
      Begin VB.Label Label8 
         Caption         =   "Label8"
         Height          =   375
         Left            =   720
         TabIndex        =   8
         Top             =   240
         Width           =   1455
      End
      Begin VB.Label Label7 
         Caption         =   "登记日期"
         Height          =   495
         Left            =   3360
         TabIndex        =   7
         Top             =   1560
         Width           =   1575
      End
      Begin VB.Label Label6 
         Caption         =   "出版日期"
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   1680
         Width           =   1695
      End
      Begin VB.Label Label5 
         Caption         =   "出版社"
         Height          =   495
         Left            =   3360
         TabIndex        =   5
         Top             =   840
         Width           =   1575
      End
      Begin VB.Label Label4 
         Caption         =   "作者"
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   1200
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "类别"
         Height          =   495
         Left            =   3360
         TabIndex        =   3
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "书名"
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "编号"
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   240
         Width           =   975
      End
   End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Change()
Combo2.ListIndex = Combo1.ListIndex
End Sub

Private Sub Combo2_Change()
Combo1.ListIndex = Combo2.ListIndex
End Sub
Option Explicit
Dim leibie As String
Dim qixian As Integer
Dim shumn As Integer
Dim maxnum As Integer

Private Sub Command1_Click()
Dim rs_borrowbook As New ADODB.Recordset
Dim sql As String
Adodc1.RecordSource = "select * from 读者信息 where 读者编号='" & Combo1.Text & ","
Adodc1.Refresh
leibie = Adodc1.Recordset.Fields(3)
shumu = Adodc1.Recordset.Fields(8)
Adodc1.RecordSource = "select * from 读者类别 where 种类名称='" & leibie & "'"
Adodc1.Refresh
qixian = Adodc1.Recordset.Fields(2)
maxnum = Adodc1.Recordset.Fields(1)
If shumu >= maxnum Then
MsgBox "该读者借书数额已满!", vbOKOnly + vbExclamation
Exit Sub
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim i As Integer
Adodc2.RecordSource = "select * from  书籍信息 where 书籍编号='" & book_num & "'"
Adodc2.Refresh
Label8.Caption = Adodc2.Recordset.Fields(0)
Label9.Caption = Adodc2.Recordset.Fields(1)
Label10.Caption = Adodc2.Recordset.Fields(2)
Label11.Caption = Adodc2.Recordset.Fields(3)
Label12.Caption = Adodc2.Recordset.Fields(4)
Label13.Caption = Adodc2.Recordset.Fields(5)
Label14.Caption = Adodc2.Recordset.Fields(6)
Combo1.Clear
Combo2.Clear
Adodc1.RecordSource = "select * from 读者信息"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
For i = 0 To Adodc1.Recordset.RecordCount - 1
Combo1.AddItem Adodc1.Recordset.Fields(1).Value
Combo2.AddItem Adodc1.Recordset.Fields(0).Value
Adodc1.Recordset.MoveNext
Next
Combo1.ListIndex = 0
Combo2.ListIndex = 0
End Sub

Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub

⌨️ 快捷键说明

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