?? frmldjc.frm
字號:
VERSION 5.00
Begin VB.Form FrmLDJC
Caption = "路燈檢測"
ClientHeight = 4710
ClientLeft = 60
ClientTop = 345
ClientWidth = 9735
LinkTopic = "Form1"
ScaleHeight = 4710
ScaleWidth = 9735
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 12
Left = 6360
TabIndex = 19
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 11
Left = 5280
TabIndex = 18
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 10
Left = 4200
TabIndex = 17
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 9
Left = 3120
TabIndex = 16
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 8
Left = 2040
TabIndex = 15
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 7
Left = 960
TabIndex = 14
Top = 1680
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 6
Left = 6360
TabIndex = 13
Top = 1080
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 5
Left = 5280
TabIndex = 12
Top = 1080
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 4
Left = 4200
TabIndex = 11
Top = 1080
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 3
Left = 3120
TabIndex = 10
Top = 1080
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 2
Left = 2040
TabIndex = 9
Top = 1080
Width = 855
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 0
Left = 9360
TabIndex = 8
Top = 0
Visible = 0 'False
Width = 855
End
Begin VB.CommandButton CmdOK
Caption = "確定"
Height = 375
Index = 1
Left = 8160
TabIndex = 7
Top = 2640
Width = 855
End
Begin VB.TextBox TexCS
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000004&
BorderStyle = 0 'None
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 285
Left = 8520
Locked = -1 'True
TabIndex = 4
Text = "1"
Top = 3840
Width = 435
End
Begin VB.CommandButton CmdOK
Caption = "確定"
Height = 375
Index = 0
Left = 8160
TabIndex = 3
Top = 1800
Width = 855
End
Begin VB.CheckBox Che2
Caption = "全選"
Height = 375
Left = 8160
TabIndex = 2
Top = 1080
Width = 735
End
Begin VB.CheckBox Che1
Caption = "Check1"
Height = 375
Index = 1
Left = 960
TabIndex = 1
Top = 1080
Width = 855
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 375
Index = 0
Left = 7080
TabIndex = 0
Top = -120
Visible = 0 'False
Width = 735
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "今天第"
Height = 180
Left = 7920
TabIndex = 6
Top = 3885
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "次巡檢"
Height = 180
Left = 9030
TabIndex = 5
Top = 3885
Width = 540
End
End
Attribute VB_Name = "FrmLDJC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As ADODB.Recordset
Dim sql As String
Private Sub Che2_Click()
For i = 1 To (LDNum)
Che1(i).Value = Che2.Value
Next i
End Sub
Private Sub CmdOK_Click(Index As Integer)
On Error Resume Next
Select Case Index
Case 0
For i = 1 To (LDNum)
If Che1(i).Value = 1 Then
gXJFlag = True '要進行巡檢
xXJ(i).xFlag = True
gXJJS = 12
gXJCount = 0
xXJ(i).xOK = True '巡檢成功標志
gDXXCS = Val(Trim(TexCS.Text))
Else
xXJ(i).xFlag = False '不要進行巡檢
xXJ(i).xOK = True
End If
Next i
FrmMain.Timer4.Enabled = True 'Timer4計時器觸發
Unload Me
Case 1
Unload Me
End Select
End Sub
Private Sub Form_load()
On Error Resume Next
' Left = (Screen.Width - Me.Width) / 2
' Top = (Screen.Height - Me.Height) / 2
For i = 1 To (LDNum)
Che1(i).Caption = lLD(i).tFJ
Che1(i).Visible = True
Next i
Call CXCS
End Sub
Private Sub CXCS()
On Error Resume Next
Dim lint1 As Integer
sql = ""
sql = "select max(次數) as CS from 巡檢報告 WHERE 日期 = #" + Format(Now, "yyyy-mm-dd") + "# "
Set rst = New ADODB.Recordset
rst.CursorLocation = adUseClient
rst.Open sql, adocnstring, adOpenDynamic, adLockOptimistic, adCmdText
If Not rst.EOF Then
int1 = IIf(IsNull(rst![CS]), 0, rst![CS])
Else
int1 = 0
End If
int1 = int1 + 1
TexCS.Text = Trim(Val(int1))
' gDXXCS = int1
rst.Close
'sql = sql & "order by 日期CX DESC"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -