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

📄 库存教材查询条件.frm

📁 学生教材管理系统:对学校书库进销存进行管理的系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
Attribute VB_Exposed = False
Option Explicit
Public Sub aa()  '用于简单查询中
  If Text1.Text = "" Then
    MsgBox "请输入要查询的值!"
    Text1.SetFocus
  Else
        If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "没有要查找的记录!"
        Text1.Text = ""
        End If
        Unload Me
    End If
End Sub

Private Sub Check1_Click()
     Text2.SetFocus
     Text2.Text = ""
     Label4.Visible = False
End Sub

Private Sub Check3_Click()
     Text3.SetFocus
     Text3.Text = ""
     Label4.Visible = False
End Sub

Private Sub Check4_Click()
    Text4.SetFocus
    Text4.Text = ""
    Label4.Visible = False
End Sub

Private Sub Check5_Click()
     DTPicker1.SetFocus
     Label4.Visible = True
End Sub

Private Sub Command1_Click()
    If Option1.Value = True Then
        库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text1 & "%'"
        库存教材查询.Adodc1.Refresh
        aa
    End If
    If Option2.Value = True Then
        库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 作者 like '%" & Text1 & "%'"
        库存教材查询.Adodc1.Refresh
        aa
    End If
    If Option3.Value = True Then
        库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版社 like '%" & Text1 & "%'"
        库存教材查询.Adodc1.Refresh
        aa
        Set 库存教材查询设计器.rs教材库存表.DataSource = 库存教材查询.Adodc1
    End If
    If Option4.Value = True Then
        库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 书类别 like '%" & Text1 & "%'"
        库存教材查询.Adodc1.Refresh
        aa
        Set 库存教材查询设计器.rs教材库存表.DataSource = 库存教材查询.Adodc1
    End If
End Sub

Private Sub Command2_Click()
  Unload Me
End Sub

Private Sub Command3_Click()
If Check1.Value = 1 Then
 库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'"
 库存教材查询.Adodc1.Refresh
 If Text2.Text = "" Then
   MsgBox "请输入要查询的值!"
   Text2.SetFocus
 Else
 If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
          MsgBox "没有此记录"
          Text2.Text = ""
          Text2.SetFocus
 End If
 Unload Me
End If
Else
  If Check3.Value = 1 Then
   库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版社 like '%" & Text3 & "%'"
   库存教材查询.Adodc1.Refresh
   If Text3.Text = "" Then
      MsgBox "请输入要查询的值!"
      Text3.SetFocus
   Else
   If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
          MsgBox "没有此记录"
          Text3.Text = ""
          Text3.SetFocus
    End If
    Unload Me
    End If
  Else
    If Check4.Value = 1 Then
      库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 书类别 like '%" & Text4 & "%'"
      库存教材查询.Adodc1.Refresh
      If Text4.Text = "" Then
         MsgBox "请输入要查询的值!"
         Text4.SetFocus
      End If
      If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
          MsgBox "没有此记录"
          Text4.Text = ""
          Text4.SetFocus
      End If
      Unload Me
    Else
      If Check5.Value = 1 Then
        库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版日期 between  #" & Str$(DTPicker1.Value) & "#  and #" & Str$(DTPicker2.Value) & "#"
        库存教材查询.Adodc1.Refresh
        If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
          MsgBox "没有此记录"
          DTPicker1.SetFocus
          
        End If
        
      Else
        If Check1.Value = 1 And Check3.Value = 1 Then
          库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + " And " + "出版社 like '%" & Text3 & "%'"
          库存教材查询.Adodc1.Refresh
          Unload Me
        Else
          If Check1.Value = 1 And Check4.Value = 1 Then
            库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + "and" + "书类别 like '%" & Text4 & "%'"
            库存教材查询.Adodc1.Refresh
            Unload Me
            If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                MsgBox "没有此记录"
            End If
          Else
            If Check3.Value = 1 And Check4.Value = 1 Then
              库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版社 like '%" & Text3 & "%'" + "and" + "书类别 like '%" & Text4 & "%'"
              库存教材查询.Adodc1.Refresh
              Unload Me
              If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                  MsgBox "没有此记录"
              End If
            Else
              If Check1.Value = 1 And Check3.Value = 1 And Check4.Value = 1 Then
                库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + "and" + "出版社 like '%" & Text3 & "%'" + "and" + "书类别 like '%" & Text4 & "%'"
                库存教材查询.Adodc1.Refresh
                Unload Me
                If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                       MsgBox "没有此记录"
                End If
              Else
                If Check3.Value = 1 And Check5.Value = 1 Then
                   库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版社 like '%" & Text3 & "%'" + "and" + "出版日期  between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                   库存教材查询.Adodc1.Refresh
                   Unload Me
                   If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                    MsgBox "没有此记录"
                   End If
                Else
                   If Check4.Value = 1 And Check5.Value = 1 Then
                      库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 书类别 like '%" & Text4 & "%'" + "and" + "出版日期 between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                      库存教材查询.Adodc1.Refresh
                      Unload Me
                      If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                          MsgBox "没有此记录"
                      End If
                   Else
                      If Check1.Value = 1 And Check3.Value = 1 And Check5.Value = 1 Then
                         库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + "and" + "出版社 like '%" & Text3 & "%'" + "and" + "出版日期 between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                         库存教材查询.Adodc1.Refresh
                         Unload Me
                         If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                            MsgBox "没有此记录"
                         End If
                      Else
                         If Check3.Value = 1 And Check4.Value = 1 And Check5.Value = 1 Then
                            库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 出版社 like '%" & Text3 & "%'" + "and" + "书类别 like '%" & Text4 & "%'" + "and" + "出版日期 between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                            库存教材查询.Adodc1.Refresh
                            Unload Me
                            If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                                MsgBox "没有此记录"
                             End If
                         Else
                            If Check1.Value = 1 And Check4.Value = 1 And Check5.Value = 1 Then
                               库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + "and" + "书类别 like '%" & Text4 & "%'" + "and" + "出版日期 between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                               库存教材查询.Adodc1.Refresh
                               Unload Me
                               If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                                   MsgBox "没有此记录"
                               End If
                            Else
                               If Check1.Value = 1 And Check3.Value = 1 And Check4.Value = 1 And Check5.Value = 1 Then
                                  库存教材查询.Adodc1.RecordSource = "select * from 教材库存表 where 教材名 like '%" & Text2 & "%'" + "and" + "书类别 like '%" & Text4 & "%'" + "and" + "出版社 like '%" & Text3 & "5'" + "出版日期 between #" & Str$(DTPicker1.Value) & "# and #" & Str$(DTPicker2.Value) & "#"
                                  库存教材查询.Adodc1.Refresh
                                  Unload Me
                                  If 库存教材查询.Adodc1.Recordset.RecordCount = 0 Then
                                        MsgBox "没有此记录"
                                  End If
                               End If
                            End If
                         End If
                     End If
                  End If
                End If
              End If
            End If
          End If
        End If
      End If
    End If
  End If
End If
End Sub

Private Sub Command4_Click()
  Unload Me
End Sub

Private Sub Option1_Click()
    Text1.SetFocus
    Text1.Text = ""
    '库存教材查询.Command3.Enabled = False
End Sub

Private Sub Option2_Click()
        Text1.SetFocus
        Text1.Text = ""
        '库存教材查询.Command3.Enabled = False
End Sub

Private Sub Option3_Click()
    Text1.SetFocus
    Text1.Text = ""
    库存教材查询.Command3.Enabled = True
End Sub

Private Sub Option4_Click()
        Text1.SetFocus
        Text1.Text = ""
        库存教材查询.Command3.Enabled = True
End Sub

Private Sub Text1_Click()
    Text1.Text = ""
    Text1.SetFocus
End Sub

Private Sub Text2_Click()
    Text2.Text = ""
    Text2.SetFocus
End Sub

Private Sub Text3_Click()
   Text3.Text = ""
   Text3.SetFocus
End Sub

Private Sub Text4_Click()
   Text4.Text = ""
   Text4.SetFocus
End Sub

⌨️ 快捷键说明

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