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

📄 frm_hyjs.frm

📁 很好的行政管理系统,供大家享用,功能非常强大,希望大家的支持
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_hyjs 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "会议信息接收"
   ClientHeight    =   3150
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5640
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3150
   ScaleWidth      =   5640
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frm_hyjs.frx":0000
      Left            =   1275
      List            =   "frm_hyjs.frx":0002
      Style           =   1  'Simple Combo
      TabIndex        =   15
      Top             =   2715
      Width           =   1005
   End
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "关闭"
      Height          =   330
      Left            =   4455
      TabIndex        =   14
      Top             =   2700
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   5
      Left            =   3330
      TabIndex        =   12
      Top             =   2715
      Width           =   990
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   4
      Left            =   1275
      TabIndex        =   10
      Top             =   2235
      Width           =   4035
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   3
      Left            =   1275
      TabIndex        =   8
      Top             =   1845
      Width           =   4035
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   2
      Left            =   1275
      TabIndex        =   6
      Top             =   1455
      Width           =   4035
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   1
      Left            =   1275
      TabIndex        =   4
      Top             =   1065
      Width           =   4035
   End
   Begin VB.TextBox Text1 
      Height          =   300
      Index           =   0
      Left            =   1275
      TabIndex        =   2
      Top             =   675
      Width           =   4035
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Height          =   180
      Left            =   3705
      TabIndex        =   16
      Top             =   330
      Width           =   90
   End
   Begin VB.Label Label8 
      Caption         =   "信息通知人"
      Height          =   240
      Left            =   2340
      TabIndex        =   13
      Top             =   2790
      Width           =   960
   End
   Begin VB.Label Label7 
      Caption         =   "信息接收人"
      Height          =   240
      Left            =   345
      TabIndex        =   11
      Top             =   2790
      Width           =   900
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00008000&
      X1              =   330
      X2              =   5445
      Y1              =   2625
      Y2              =   2625
   End
   Begin VB.Label Label6 
      Caption         =   "大概内容"
      Height          =   240
      Left            =   345
      TabIndex        =   9
      Top             =   2280
      Width           =   825
   End
   Begin VB.Label Label5 
      Caption         =   "会议时间"
      Height          =   300
      Left            =   345
      TabIndex        =   7
      Top             =   1920
      Width           =   885
   End
   Begin VB.Label Label4 
      Caption         =   "主持人"
      Height          =   240
      Left            =   345
      TabIndex        =   5
      Top             =   1530
      Width           =   735
   End
   Begin VB.Label Label3 
      Caption         =   "会议地点"
      Height          =   330
      Left            =   345
      TabIndex        =   3
      Top             =   1140
      Width           =   945
   End
   Begin VB.Label Label2 
      Caption         =   "会议主题"
      Height          =   225
      Left            =   345
      TabIndex        =   1
      Top             =   765
      Width           =   825
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00008000&
      X1              =   315
      X2              =   5445
      Y1              =   585
      Y2              =   585
   End
   Begin VB.Label Label1 
      Caption         =   "信息接收"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   2295
      TabIndex        =   0
      Top             =   210
      Width           =   1095
   End
End
Attribute VB_Name = "frm_hyjs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Cancel_Click()
   Dim j As Integer
   On Error Resume Next
   AdoRs.Open "select * from 会议通知 where 接收人='" + Combo1.Text + "' and 是否接收=0 ", Cnn, adOpenKeyset
     If AdoRs.RecordCount > 0 Then
        Set AdoRs = Cnn.Execute("UPDATE 会议通知 SET 是否接收=1 where 接收人='" + Combo1.Text + "' and 是否接收=0")
        Unload Me
     Else
        Unload Me
     End If
   AdoRs.Close
End Sub

Private Sub Cmd_Ok_Click()
 Dim StrNums As Integer
   If Text1(0).Text = "" Or Text1(4).Text = "" Or Text1(5).Text = "" Or Combo1.Text = "" Then
      MsgBox "重要信息不能为空值", 48, "提示信息"
    Else
       AdoRs.Open "select * from 会议通知 ", Cnn, adOpenKeyset
         If AdoRs.RecordCount > 0 Then
              AdoRs.MoveLast
              StrNums = AdoRs.Fields("ID") + 1
          Else
              StrNums = 1
          End If
       AdoRs.Close
            c = MsgBox("确认发送该信息吗?", 33, "提示信息")
              If c = vbOK Then
                Set AdoRs = Cnn.Execute("insert into 会议通知 values(" & StrNums & ",'" & Text1(0) _
                & "','" & Text1(3) & "','" & Text1(1) & "','" & Text1(2) & "','" & Text1(4) & "','" _
                & STR(Date) & "','" & Combo1.Text & "','" & Text1(5) & "','0')")
                MsgBox "数据发送成功完成", 64, "提示信息"
              End If
    End If
End Sub

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = 13 Then
    Text1(5).SetFocus
  End If
End Sub

Private Sub Form_Load()
   AdoRs.Open "select * from 会议通知 where 接收人='" + Name1 + "' and 是否接收=0 ", Cnn, adOpenKeyset
     If AdoRs.RecordCount > 0 Then
        Text1(0).Text = AdoRs.Fields(1)
        Text1(3).Text = AdoRs.Fields(2)
        Text1(1).Text = AdoRs.Fields(3)
        Text1(2).Text = AdoRs.Fields(4)
        Text1(4).Text = AdoRs.Fields(5)
        Label9.Caption = "通知时间 " & AdoRs.Fields(6)
        Combo1.Text = AdoRs.Fields(7)
        Text1(5).Text = AdoRs.Fields(8)
     End If
   AdoRs.Close
End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
   On Error Resume Next
   If KeyCode = 13 Then
      If Index = 4 Then
        Combo1.SetFocus
        Exit Sub
      End If
   End If
   If Index < 7 And KeyCode = 38 Then Text1(Index - 1).SetFocus
   If Index >= 0 And KeyCode = 40 Then Text1(Index + 1).SetFocus
   If Index >= 0 And KeyCode = 13 Then Text1(Index + 1).SetFocus
   If Index = 6 And KeyCode = 13 Then
      Call Cmd_Ok_Click
   End If
End Sub



⌨️ 快捷键说明

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