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

📄 frmlendquery.frm

📁 图书馆管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            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
      BeginProperty Column07 
         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 Column08 
         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     =   945.071
         EndProperty
         BeginProperty Column06 
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1065.26
         EndProperty
         BeginProperty Column08 
            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 ImageClear_Click()
'清空查询条件
txtBookID.Text = ""
txtBookName.Text = ""
txtReaderID.Text = ""
txtReaderName.Text = ""
End Sub
Private Sub ImageClose_Click()
Unload Me
End Sub

Private Sub ImageFind_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

'进行Adodc控件的设置
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 + -