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

📄 frmseekp.frm

📁 档案管理系统,使用vb6+access数据库开发
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmSeekP 
   Caption         =   "查询照片内容"
   ClientHeight    =   6672
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   10512
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.8
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   MaxButton       =   0   'False
   ScaleHeight     =   6672
   ScaleWidth      =   10512
   StartUpPosition =   2  '屏幕中心
   Begin MSFlexGridLib.MSFlexGrid msfgP 
      Height          =   5412
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   9852
      _ExtentX        =   17378
      _ExtentY        =   9546
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc adoDP 
      Height          =   312
      Left            =   360
      Top             =   6000
      Visible         =   0   'False
      Width           =   1800
      _ExtentX        =   3175
      _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    =   "DataP"
      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 = "frmSeekP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim adoCon As ADODB.Connection
Dim adoRst As ADODB.Recordset

Private Function ConvertNull(para_Value As Variant) As Variant
If IsNull(para_Value) = True Then
   ConvertNull = ""
Else
   ConvertNull = para_Value
End If
End Function

Private Sub Form_Load()
  Dim sSQL As String
  Set adoCon = New ADODB.Connection
  
  Set adoRst = New ADODB.Recordset
  Set adoCom = New ADODB.Command
    
  adoCon.CursorLocation = adUseClient
  adoCon.Open "PmData", "", ""
  
  Set adoRst.ActiveConnection = adoCon
 
  adoRst.LockType = adLockReadOnly
  adoRst.CursorType = adOpenKeyset
   
  sSQL = "Select * From DataP " & frmFtype.FilterText & _
            " Order By 档号, 顺序号, FileType, 照片号"
  adoRst.Open sSQL
  Call FillData     '填充数据
End Sub

Private Sub FillData()
Dim iRow, p_no As Integer
With msfgP
  .Cols = 8
  .Rows = 1
  .TextMatrix(0, 0) = "档号"
  .TextMatrix(0, 1) = "顺序号"
  .TextMatrix(0, 2) = "照片号"
  .TextMatrix(0, 3) = "底片号"
  .TextMatrix(0, 4) = "摄影者"
  .TextMatrix(0, 5) = "题名"
  .TextMatrix(0, 6) = "张数"
  .TextMatrix(0, 7) = "拍摄时间"
  
  .RowHeight(0) = 300
  .ColWidth(0) = 1100
  .ColWidth(1) = 750
  .ColWidth(2) = 1600
  .ColWidth(3) = 1600
  .ColWidth(4) = 1600
  .ColWidth(5) = 5500
  .ColWidth(6) = 500
  .ColWidth(7) = 1300
  
  iRow = 1
  Do Until adoRst.EOF
     .AddItem ""
     .RowHeight(iRow) = 300
     .TextMatrix(iRow, 0) = adoRst!档号
     If iRow = 1 Or .TextMatrix(iRow - 1, 1) <> adoRst!顺序号 _
           Or .TextMatrix(iRow - 1, 0) <> adoRst!档号 Then
        .TextMatrix(iRow, 1) = adoRst!顺序号
     End If
     .TextMatrix(iRow, 5) = adoRst!题名
     If adoRst!FileType Then
       .TextMatrix(iRow, 6) = adoRst!张数
     Else
        p_no = adoRst!照片号
        .TextMatrix(iRow, 2) = LTrim(Trim(adoRst!档号)) & "(" & LTrim(Str(p_no)) & ")"
        .TextMatrix(iRow, 3) = ConvertNull(adoRst!底片号)
        .TextMatrix(iRow, 4) = ConvertNull(adoRst!摄影者)
        .TextMatrix(iRow, 7) = ConvertNull(adoRst!拍摄时间)
     End If
     adoRst.MoveNext
     iRow = iRow + 1
  Loop
End With
If adoRst.RecordCount <> 0 Then adoRst.MoveFirst
End Sub

⌨️ 快捷键说明

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