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

📄 frmbookquery.frm

📁 图书馆管理系统 功能基本上具备,使用方便
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            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            =   5
            Format          =   ""
            HaveTrueFalseNull=   1
            TrueValue       =   "是"
            FalseValue      =   "否"
            NullValue       =   ""
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            Locked          =   -1  'True
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1904.882
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   854.929
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1964.976
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   854.929
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   900.284
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   1019.906
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   929.764
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "FrmBookQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()

End Sub

Private Sub chkRigDate_Click()
If chkRigDate.Value = 1 Then
   dtpRigDate.Enabled = True
Else
   dtpRigDate.Enabled = False
End If
End Sub







Private Sub cmdClear_Click()
txtBookID.Text = ""
txtBookName.Text = ""
cboType.Text = ""
txtBookConcern.Text = ""
txtBookPrice.Text = ""

End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdFind_Click()
Dim strSQL As String
Dim strCon(6) As String
Dim intCount As Integer
Dim i As Integer
intCount = 0

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


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


If cboType.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(3) = "类别代码 like '%" & Mid(cboType.Text, 1, 1) & "%'"
    Else
        strCon(3) = "类别代码='" & Mid(cboType.Text, 1, 1) & "'"
    End If
    
Else
    strCon(3) = ""
End If


If txtBookConcern.Text <> "" Then
    If chkMoHu.Value = 1 Then
        strCon(4) = "出版社 like '%" & txtBookConcern.Text & "%'"
    Else
        strCon(4) = "出版社='" & txtBookConcern.Text & "'"
    End If
Else
    strCon(4) = ""
End If


If txtBookPrice.Text <> "" Then
    If chkMoHu.Value = 1 Then
       strCon(5) = "书籍价格 like %" & CInt(txtBookPrice.Text) & "%"
    Else
       strCon(5) = "书籍价格=" & CInt(txtBookPrice.Text) & ""
    End If
    
Else
    strCon(5) = ""
End If


If chkRigDate.Value = 1 Then
    If chkMoHu.Value = 1 Then
        strCon(6) = "登记日期 like #" & dtpRigDate.Value & "#"
    Else
        strCon(6) = "登记日期=#" & dtpRigDate.Value & "#"
    End If
    
Else
    strCon(6) = ""
End If


If strCon(1) = "" And strCon(2) = "" And strCon(3) = "" And strCon(4) = "" And strCon(5) = "" And strCon(6) = "" Then
    strSQL = "select * from bookInfo"
Else
   strSQL = "select * from bookInfo where "
    For i = 1 To 6
       If strCon(i) <> "" Then
          intCount = intCount + 1
            If intCount = 1 Then
                strSQL = strSQL + strCon(i)
            Else
                strSQL = strSQL + " and " + strCon(i)
            End If
       End If
   Next
End If

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

Private Sub Form_Load()
dtpRigDate.Value = Date


        Set g_rs = g_db.OpenRecordset("bookType", dbOpenTable)
        cboType.Clear
        If g_rs.RecordCount > 0 Then
           g_rs.MoveFirst
           Do While Not g_rs.EOF
              cboType.AddItem g_rs!类别代码 + "-" + g_rs!书籍类别
              g_rs.MoveNext
           Loop
        End If
        Set g_rs = Nothing
End Sub

⌨️ 快捷键说明

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