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

📄 frmwarning.frm

📁 用于控制氧乐果生产的程序
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmWarning 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "报警明细窗口"
   ClientHeight    =   5145
   ClientLeft      =   30
   ClientTop       =   330
   ClientWidth     =   7380
   ClipControls    =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   5145
   ScaleWidth      =   7380
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtDay 
      Alignment       =   2  'Center
      Height          =   300
      Left            =   3960
      TabIndex        =   2
      Top             =   60
      Width           =   612
   End
   Begin VB.TextBox txtMonth 
      Alignment       =   2  'Center
      Height          =   300
      Left            =   3120
      TabIndex        =   1
      Top             =   60
      Width           =   612
   End
   Begin VB.TextBox txtYear 
      Alignment       =   2  'Center
      Height          =   300
      Left            =   2280
      TabIndex        =   0
      Top             =   60
      Width           =   612
   End
   Begin VB.CommandButton Command5 
      BackColor       =   &H80000000&
      Cancel          =   -1  'True
      Caption         =   "退出&B"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   3360
      MouseIcon       =   "frmWarning.frx":0000
      MousePointer    =   99  'Custom
      Picture         =   "frmWarning.frx":0152
      Style           =   1  'Graphical
      TabIndex        =   3
      ToolTipText     =   "退出本窗口"
      Top             =   4440
      Width           =   612
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "frmWarning.frx":0314
      Height          =   3852
      Left            =   120
      OleObjectBlob   =   "frmWarning.frx":0328
      TabIndex        =   4
      ToolTipText     =   "显示查询日以来系统的所有报警记录"
      Top             =   480
      Width           =   7092
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\ylg2\warning\bjdb.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   324
      Left            =   5280
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   4440
      Visible         =   0   'False
      Width           =   1152
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "日"
      Height          =   180
      Left            =   4560
      TabIndex        =   8
      Top             =   120
      Width           =   180
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "月"
      Height          =   180
      Left            =   3720
      TabIndex        =   7
      Top             =   120
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "年"
      Height          =   180
      Left            =   2880
      TabIndex        =   6
      Top             =   120
      Width           =   180
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "请输入查询日期:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   360
      TabIndex        =   5
      Top             =   96
      Width           =   1920
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   5080
      Left            =   36
      Top             =   0
      Width           =   7260
   End
End
Attribute VB_Name = "frmWarning"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Const mstrSql = "select * from [bjjl] where date >= "
Private Sub Command5_Click()
Unload Me
End Sub

Private Sub Form_Load()
Width = Screen.Width - dataviewfrm.Width - dataviewfrm.Left
Left = dataviewfrm.Left + dataviewfrm.Width
Top = baojingfrm.Top + baojingfrm.Height
Height = Screen.Height - baojingfrm.Top - baojingfrm.Height
Data1.RecordSource = "select * from bjjl where date=" & "#" & Date & "#"
End Sub

Private Sub txtDay_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo s:
If KeyCode = vbKeyReturn Then
Dim msg As Variant
Dim mfDate As Date
msg = Val(txtYear.Text) & "-" & Val(txtMonth.Text) & "-" & Val(txtDay.Text)
mfDate = CDate(msg)
DoEvents
With Data1
    .RecordSource = mstrSql & "#" & 20 & mfDate & "#"
    .Refresh
    .Recordset.MoveFirst
End With
End If
Exit Sub
s: Call Inform(131)
End Sub

Private Sub Txtyear_GotFocus()
Call GotFocusAgain(txtYear)
End Sub
Private Sub Txtmonth_GotFocus()
Call GotFocusAgain(txtMonth)
End Sub
Private Sub Txtday_GotFocus()
Call GotFocusAgain(txtDay)
End Sub

⌨️ 快捷键说明

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