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

📄 frmfiltera.frm

📁 档案管理系统,使用vb6+access数据库开发
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Begin MSDataListLib.DataCombo dcF 
         Bindings        =   "frmFilterA.frx":00E1
         Height          =   348
         Index           =   2
         Left            =   2040
         TabIndex        =   19
         ToolTipText     =   "主题词"
         Top             =   3240
         Width           =   3732
         _ExtentX        =   6583
         _ExtentY        =   614
         _Version        =   393216
         Enabled         =   0   'False
         Style           =   2
         BackColor       =   -2147483648
         ListField       =   "Ztc"
         BoundColumn     =   "ZtcID"
         Text            =   ""
      End
      Begin MSDataListLib.DataCombo dcF 
         Bindings        =   "frmFilterA.frx":00F6
         Height          =   348
         Index           =   1
         Left            =   2040
         TabIndex        =   15
         ToolTipText     =   "责任者"
         Top             =   1320
         Width           =   3732
         _ExtentX        =   6583
         _ExtentY        =   614
         _Version        =   393216
         Enabled         =   0   'False
         Style           =   2
         BackColor       =   -2147483648
         ListField       =   "Zr"
         BoundColumn     =   "ZrID"
         Text            =   ""
      End
   End
   Begin MSAdodcLib.Adodc adoZTC 
      Height          =   312
      Left            =   7200
      Top             =   2400
      Visible         =   0   'False
      Width           =   960
      _ExtentX        =   1693
      _ExtentY        =   550
      ConnectMode     =   3
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   1
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   5
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=PmData"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "PmData"
      OtherAttributes =   ""
      UserName        =   "Admin"
      Password        =   ""
      RecordSource    =   "Ztc"
      Caption         =   ""
      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 adoZR 
      Height          =   312
      Left            =   7200
      Top             =   2160
      Visible         =   0   'False
      Width           =   960
      _ExtentX        =   1693
      _ExtentY        =   550
      ConnectMode     =   3
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   1
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   5
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=PmData"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "PmData"
      OtherAttributes =   ""
      UserName        =   "Admin"
      Password        =   ""
      RecordSource    =   "Zr"
      Caption         =   ""
      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
End
Attribute VB_Name = "frmFilterA"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim FText As String

Private Sub CheckFC_Click(Index As Integer)
With CheckFC(Index)
  If .Value = 0 Then
     With ComboF(Index)
       .Enabled = False
       .BackColor = &H80000004
       .Text = ""
     End With
  Else
     With ComboF(Index)
       .Enabled = True
       .BackColor = &H80000005
       .SetFocus
     End With
  End If
End With
cmdClear.Enabled = True
End Sub

Private Sub CheckFO_Click()
With CheckFO
  If .Value = 0 Then
     ComboO.Enabled = False
     ComboO.BackColor = &H80000004
     TextO.Enabled = False
     TextO.BackColor = &H80000004
     ComboO.Text = ""
     TextO.Text = ""
  Else
     ComboO.Enabled = True
     ComboO.BackColor = &H80000005
     TextO.Enabled = True
     TextO.BackColor = &H80000005
  End If
End With
cmdClear.Enabled = True
End Sub

Private Sub CheckFT_Click(Index As Integer)
With CheckFT(Index)
  If .Value = 0 Then
     With TextF(Index)
       .Enabled = False
       .BackColor = &H80000004
       .Text = ""
     End With
  Else
     With TextF(Index)
       .Enabled = True
       .BackColor = &H80000005
       .SetFocus
     End With
  End If
End With
cmdClear.Enabled = True
End Sub

Private Sub CheckFZ_Click(Index As Integer)
With CheckFZ(Index)
  If .Value = 0 Then
     With dcF(Index)
       .Enabled = False
       .BackColor = &H80000004
       .Text = ""
     End With
  Else
     With dcF(Index)
       .Enabled = True
       .BackColor = &H80000005
       .SetFocus
     End With
  End If
End With
cmdClear.Enabled = True
End Sub

Private Sub cmdALL_Click()
Dim i As Integer
For i = 0 To 2
  CheckFC(i).Value = 1
  CheckFT(i).Value = 1
Next i
CheckFT(3).Value = 1
CheckFZ(0).Value = 1
CheckFZ(1).Value = 1
CheckFO.Value = 1
cmdALL.Enabled = False
cmdClear.Enabled = True
End Sub

Private Sub cmdClear_Click()
Dim i As Integer
For i = 0 To 2
  CheckFC(i).Value = 0
  CheckFT(i).Value = 0
Next i
CheckFT(3).Value = 0
CheckFZ(0).Value = 0
CheckFZ(1).Value = 0
CheckFO.Value = 0
cmdClear.Enabled = False
cmdALL.Enabled = True
End Sub

Private Sub cmdLast_Click()
frmFilterA.Hide
Unload frmFilterA
Load frmFtype
frmFtype.Show
End Sub

Private Sub cmdNext_Click()
FText = ""
Call FillText       '组织数据过滤条件
FilterTest.Text = FText
frmFtype.FilterText = FText
frmFilterA.Hide
Unload frmFilterA
Select Case frmMain.FileManage      '选择管理方式
       Case 2       '查询
            Load frmSeekA
            frmSeekA.Show
       Case 3       '打印
       
       Case 4       '修改
            Load frmModifyA
            frmModifyA.Show
End Select
End Sub

Private Sub FillText()      '组织过滤条件子程序
Dim i, lDate As Integer
If CheckF.Value = 0 Then
  '普通查询
  For i = 0 To 2
    If CheckFT(i).Value = 1 And TextF(i).Text <> "" Then
       FText = FText + " and InStr(" & CheckFT(i).ToolTipText & _
            ",'" & Trim(TextF(i).Text) & "')"
    End If
    If CheckFC(i).Value = 1 And ComboF(i).Text <> "" Then
       FText = FText + " and InStr(" & CheckFC(i).ToolTipText & _
            ",'" & Trim(ComboF(i).Text) & "')"
    End If
  Next i
  If CheckFT(3).Value = 1 And TextF(3).Text <> "" Then
     lDate = Len(TextF(3).Text)
     FText = FText + " and (Left(开始日期," & lDate & ")<='" & TextF(3).Text & "'"
     FText = FText + " and Left(最后日期," & lDate & ")>='" & TextF(3).Text & "')"
  End If
  If CheckFO.Value = 1 And ComboO.Text <> "" And TextO.Text <> "" Then
     FText = FText + " and InStr(" & ComboO.Text & ",'" & Trim(TextO.Text) & "')"
  End If
  If CheckFZ(0).Value = 1 And dcF(0).Text <> "" Then
     FText = FText + " and InStr('!'+Trim(Str(全宗名称))+'!'+Trim(Str(归档单位))+'!','!" & dcF(0).BoundText & "!')"
  End If
  If CheckFZ(1).Value = 1 And dcF(1).Text <> "" Then
     FText = FText + " and InStr('!'+Trim(Str(主题词1))+'!'+Trim(Str(主题词2))+'!'+ Trim(Str(主题词3))+'!'+ Trim(Str(主题词4))+'!'+ Trim(Str(主题词5))+'!','!" & dcF(1).BoundText & "!')"
  End If
Else
  '模糊方式
End If
End Sub

Private Sub ComboO_Click()
TextO.Text = ""
End Sub

Private Sub Form_Load()
frmFilterA.Caption = frmFilterA.Caption + "  (" + frmMain.FileType + "档案)"
End Sub

Private Sub TextF_LostFocus(Index As Integer)
Dim i As Integer
i = Index
If InStr(TextF(i).Text, "'") Then
   TextF(i).SetFocus
   Exit Sub
End If
If i = 3 Then TextF(i).Text = LTrim(Trim(TextF(i).Text))
End Sub

⌨️ 快捷键说明

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