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

📄 formchaxun.frm

📁 This is a boiler test system,has been use in factory
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Formchaxun 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form2"
   ClientHeight    =   8505
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   10800
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8505
   ScaleWidth      =   10800
   StartUpPosition =   3  '窗口缺省
   Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
      Height          =   7815
      Left            =   720
      TabIndex        =   0
      Top             =   600
      Width           =   9615
      _ExtentX        =   16960
      _ExtentY        =   13785
      _Version        =   393216
      AllowUserResizing=   1
   End
End
Attribute VB_Name = "Formchaxun"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim gConn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim row As Integer
Dim aa As Integer


Private Sub Form_Load()
Set gConn = New ADODB.Connection '定义一个新的数据库连接,建立到数据源的连接
   Set rs = New ADODB.Recordset
    gConn.ConnectionString = "DSN=guolu;UID=sa;PWD=sa"
    gConn.Open
   rs.Open "select * from wln", gConn, adOpenKeyset, adLockOptimistic

row = 1
MSFlexGrid1.Rows = row
MSFlexGrid1.Cols = rs.Fields.Count
For j = 0 To rs.Fields.Count - 1
 MSFlexGrid1.TextMatrix(0, j) = rs.Fields(j).Name
Next j
aa = 1
Do While Not rs.EOF
  row = row + 1
  
  
  MSFlexGrid1.Rows = row
  For j = 0 To rs.Fields.Count - 1
     If Not IsNull(rs.Fields(j).Value) Then
        If InStr(rs.Fields(0).Value, DATE11) Then
            MSFlexGrid1.TextMatrix(row - 1, j) = rs.Fields(j).Value
            aa = 0
        End If
        
    End If
   Next j
   If aa Then
   row = row - 1
   aa = 1
   End If

   rs.MoveNext
Loop

End Sub

⌨️ 快捷键说明

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