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

📄 frm_ybbiao.frm

📁 远程控制水表的系统。基于无线传输技术对水表远程进行操作
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   9
      BeginProperty Column00 
         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 Column01 
         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 Column02 
         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 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            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   1709.858
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   840.189
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   1019.906
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   900.284
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   959.811
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frm_ybbiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rq As String
Dim i As Integer
Dim hangs As Integer

Private Sub Command1_Click()
rq = Text2.Text + "-" + Text1.Text
If Combo1.ListIndex = -1 Then
    MsgBox "对不起你没有选择点位无法进行操作"
    Exit Sub
Else
    If Combo1.ListIndex = 0 Then
      i = 1
      Call Xsbbiao(i)
   Else
      If Combo1.ListIndex = 1 Then
         i = 2
         Call Xsbbiao(i)
      Else
         i = 3
         Call Xsbbiao(i)
     End If
  End If
End If
End Sub

Private Sub Xsbbiao(X As Integer)
If X = 1 Then
    Adodc1.RecordSource = "select * from sjcj where 日期 like '%" & rq & "%' and 点位编号=1"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
End If
If X = 2 Then
    Adodc1.RecordSource = "select * from sjcj where 日期 like '%" & rq & "%' and 点位编号=2"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
End If
If X = 3 Then
    Adodc1.RecordSource = "select * from sjcj where 日期 like '%" & rq & "%' and 点位编号=3"
    Adodc1.Refresh
    Set DataGrid1.DataSource = Adodc1
End If
End Sub

Private Sub Command2_Click()
Dim k As Integer
Dim j As Integer
Dim xlapp As Object
Dim xlBook As Object
Dim xlSheet As Object
Set xlapp = CreateObject("Excel.application")
xlapp.Visible = True
Set xlBook = xlapp.workbooks.Open(App.Path & "\baobiao.xls")
Set xlSheet = xlBook.worksheets(1)
Cyear = Year(Now)
Cmonth = Month(Now)
Cday = Day(Now)
xlSheet.Cells(2, 1) = Cyear & "  年  " & Cmonth & "  月  " & Cday & "  日" & "  第  " & i & "  点位  "

For k = 0 To DataGrid1.VisibleRows - 1
DataGrid1.Row = k
For j = 0 To 8
DataGrid1.Col = j
If IsNull(DataGrid1.Text) = False Then
xlSheet.Cells(k + 4, j + 1) = DataGrid1.Text
End If
Next j
Next k
End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = PublicStr
Combo1.List(0) = "第一点位"
Combo1.List(1) = "第二点位"
Combo1.List(2) = "第三点位"
End Sub



⌨️ 快捷键说明

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