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

📄 frmlendquery.frm

📁 图书馆管理系统,对书藉进出的管理,对学生借书的登记以及计时,并对一些学生进行会员登记,学生们可以进行网上续借.
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmLendQuery 
   Caption         =   "正在进行借阅查询"
   ClientHeight    =   7710
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10980
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   7710
   ScaleWidth      =   10980
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   495
      Left            =   8040
      Top             =   6240
      Visible         =   0   'False
      Width           =   2055
      _ExtentX        =   3625
      _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         =   ""
      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
   Begin VB.Frame Frame1 
      Caption         =   "借阅查询"
      Height          =   2775
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   10815
      Begin VB.CommandButton cmdClose 
         Caption         =   "关闭"
         Height          =   495
         Left            =   8520
         TabIndex        =   15
         Top             =   1800
         Width           =   1455
      End
      Begin VB.CommandButton cmdClear 
         Caption         =   "清空"
         Height          =   495
         Left            =   8520
         TabIndex        =   14
         Top             =   1080
         Width           =   1455
      End
      Begin VB.CommandButton cmdFind 
         Caption         =   "开始查询"
         Height          =   495
         Left            =   8520
         TabIndex        =   13
         Top             =   360
         Width           =   1455
      End
      Begin VB.CheckBox chkMoHu 
         Caption         =   "执行模糊查询"
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   2280
         Width           =   1575
      End
      Begin VB.Frame Frame2 
         Height          =   135
         Left            =   120
         TabIndex        =   11
         Top             =   2040
         Width           =   7695
      End
      Begin MSComCtl2.DTPicker dtpLendDate 
         Height          =   375
         Left            =   1080
         TabIndex        =   10
         Top             =   1560
         Width           =   2415
         _ExtentX        =   4260
         _ExtentY        =   661
         _Version        =   393216
         Format          =   22216705
         CurrentDate     =   37829
      End
      Begin VB.TextBox txtBookID 
         BackColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   1080
         TabIndex        =   8
         Top             =   960
         Width           =   2415
      End
      Begin VB.TextBox txtReaderName 
         Height          =   375
         Left            =   4920
         TabIndex        =   4
         Top             =   360
         Width           =   1455
      End
      Begin VB.TextBox txtReaderID 
         Height          =   375
         Left            =   1080
         TabIndex        =   3
         Top             =   360
         Width           =   2415
      End
      Begin VB.TextBox txtBookName 
         Enabled         =   0   'False
         Height          =   375
         Left            =   4920
         TabIndex        =   1
         Top             =   960
         Width           =   2775
      End
      Begin VB.Label Label27 
         Caption         =   "书籍编号:"
         Height          =   255
         Left            =   120
         TabIndex        =   9
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label21 
         Caption         =   "借书日期:"
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label28 
         Caption         =   "读者姓名:"
         Height          =   255
         Left            =   3960
         TabIndex        =   6
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label29 
         Caption         =   "读者编号:"
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label25 
         Caption         =   "书籍名称:"
         Height          =   255
         Left            =   3960
         TabIndex        =   2
         Top             =   1080
         Width           =   975
      End
   End
   Begin MSDataGridLib.DataGrid dtgrdLendBook 
      Bindings        =   "FrmLendQuery.frx":0000
      Height          =   4575
      Left            =   0
      TabIndex        =   16
      Top             =   3000
      Width           =   10935
      _ExtentX        =   19288
      _ExtentY        =   8070
      _Version        =   393216
      AllowUpdate     =   -1  'True
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      AllowDelete     =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   7
      BeginProperty Column00 
         DataField       =   "读者编号"
         Caption         =   "读者编号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "读者姓名"
         Caption         =   "读者姓名"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "书籍编号"
         Caption         =   "书籍编号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "书籍名称"
         Caption         =   "书籍名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "书籍类别"
         Caption         =   "书籍类别"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "借书日期"
         Caption         =   "借书日期"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "还书日期"
         Caption         =   "还书日期"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   1019.906
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1260.284
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1170.142
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1440
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   975.118
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1035.213
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "FrmLendQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub cmdClear_Click()
txtBookID.Text = ""
txtBookName.Text = ""
txtReaderID.Text = ""
txtReaderName.Text = ""
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdFind_Click()

Dim strSQL As String
Dim strCon(5) As String

Dim i As Integer


'获得所有得查询条件
If txtBookID.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(1) = "lentInfo.书籍编号 like '%" & txtBookID.Text & "%'"
    Else
        strCon(1) = "lentInfo.书籍编号='" & txtBookID.Text & "'"
    End If
Else
    strCon(1) = ""
End If


If txtBookName.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(2) = "bookInfo.书籍名称 like '%" & txtBookName.Text & "%'"
    Else
        strCon(2) = "bookInfo.书籍名称='" & txtBookName.Text & "'"
    End If
    
Else
    strCon(2) = ""
End If


If txtReaderID.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(3) = "lentInfo.读者编号 like '%" & txtReaderID.Text & "%'"
    Else
        strCon(3) = "lentInfo.读者编号='" & txtReaderID.Text & "'"
    End If
    
Else
    strCon(3) = ""
End If


If txtReaderName.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(4) = "readerInfo.读者姓名 like '%" & txtReaderName.Text & "%'"
    Else
        strCon(4) = "readerInfo.读者姓名='" & txtReaderName.Text & "'"
    End If
Else
    strCon(4) = ""
End If


If dtpLendDate.Value = 1 Then
    If chkMoHu.Value = 1 Then
        strCon(5) = "lentInfo.借书日期 like #" & dtpLendDate.Value & "#"
    Else
        strCon(5) = "lentInfo.借书日期=#" & dtpLendDate.Value & "#"
    End If
    
Else
    strCon(5) = ""
End If


  strSQL = "select lentInfo.读者编号,readerInfo.读者姓名,lentInfo.书籍编号," _
    & " bookInfo.书籍名称,bookType.书籍类别,bookInfo.出版社,bookInfo.书籍页码,lentInfo.借书日期," _
    & " lentInfo.还书日期,lentInfo.超出天数,lentInfo.罚款金额 from readerInfo,bookInfo,lentInfo,bookType " _
    & " where readerInfo.读者编号=lentInfo.读者编号 and bookInfo.书籍编号=lentInfo.书籍编号 " _
    & " and bookType.类别代码=bookInfo.类别代码 "
    For i = 1 To 5
       If strCon(i) <> "" Then
           strSQL = strSQL + " and " + strCon(i)
       End If
   Next


Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\图书馆查询管理系统.mdb;Persist Security Info=False"
Adodc1.CursorLocation = adUseClient
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = strSQL
Adodc1.Refresh

End Sub

⌨️ 快捷键说明

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