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

📄 工作表.frm

📁 工作报表的源程序内容
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1 
   BackColor       =   &H00FFC0C0&
   Caption         =   "工作报告"
   ClientHeight    =   9075
   ClientLeft      =   165
   ClientTop       =   450
   ClientWidth     =   9615
   ControlBox      =   0   'False
   Icon            =   "工作表.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Picture         =   "工作表.frx":030A
   ScaleHeight     =   9075
   ScaleWidth      =   9615
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture2 
      BackColor       =   &H00FFC0C0&
      Height          =   1935
      Left            =   7800
      ScaleHeight     =   1875
      ScaleWidth      =   1395
      TabIndex        =   21
      Top             =   480
      Width           =   1455
   End
   Begin VB.CommandButton Command8 
      BackColor       =   &H00C0E0FF&
      Caption         =   "打印"
      Height          =   375
      Left            =   7680
      Style           =   1  'Graphical
      TabIndex        =   20
      Top             =   8160
      Width           =   975
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1575
      Left            =   240
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   19
      Top             =   3000
      Width           =   9135
   End
   Begin VB.ComboBox Combo3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      ItemData        =   "工作表.frx":146F
      Left            =   1560
      List            =   "工作表.frx":1476
      TabIndex        =   18
      Top             =   720
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "工作时间表"
      Height          =   1575
      Left            =   3240
      TabIndex        =   13
      Top             =   480
      Width           =   3495
      Begin VB.ComboBox Combo2 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "dddddd aaaa"
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   3
         EndProperty
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         ItemData        =   "工作表.frx":1482
         Left            =   1440
         List            =   "工作表.frx":1484
         TabIndex        =   17
         Top             =   960
         Width           =   1575
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   1440
         TabIndex        =   14
         Top             =   240
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Format          =   23658497
         CurrentDate     =   38132
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         Caption         =   "星期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   1
         Left            =   600
         TabIndex        =   16
         Top             =   960
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         Caption         =   "工作日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   0
         Left            =   120
         TabIndex        =   15
         Top             =   360
         Width           =   1200
      End
   End
   Begin VB.CommandButton Command7 
      BackColor       =   &H00FFC0C0&
      Caption         =   "取消"
      Height          =   375
      Left            =   2760
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   8160
      Width           =   855
   End
   Begin VB.CommandButton Command6 
      BackColor       =   &H00FFC0C0&
      Caption         =   "删除"
      Height          =   375
      Left            =   1920
      Style           =   1  'Graphical
      TabIndex        =   11
      Top             =   8160
      Width           =   855
   End
   Begin VB.CommandButton Command5 
      BackColor       =   &H00FFC0C0&
      Caption         =   "修改"
      Height          =   375
      Left            =   1080
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   8160
      Width           =   855
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   9
      Top             =   8700
      Width           =   9615
      _ExtentX        =   16960
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            TextSave        =   "2004-07-28"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Object.Width           =   1552
            MinWidth        =   1552
            TextSave        =   "13:37"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   2
            Enabled         =   0   'False
            TextSave        =   "NUM"
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command3 
      BackColor       =   &H008080FF&
      Caption         =   "查询"
      Height          =   375
      Left            =   6480
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   8160
      Width           =   855
   End
   Begin VB.CommandButton Command4 
      BackColor       =   &H0000C0C0&
      Caption         =   "退出"
      Height          =   375
      Left            =   5280
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   8160
      Width           =   855
   End
   Begin MSComCtl2.MonthView MonthView1 
      Height          =   2220
      Left            =   2520
      TabIndex        =   6
      Top             =   5160
      Width           =   4065
      _ExtentX        =   7170
      _ExtentY        =   3916
      _Version        =   393216
      ForeColor       =   -2147483630
      BackColor       =   16761024
      Appearance      =   1
      StartOfWeek     =   23658497
      CurrentDate     =   38180
   End
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FF8080&
      Caption         =   "保存"
      Height          =   375
      Left            =   3960
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   8160
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "增 加"
      Height          =   375
      Left            =   120
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   8160
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      ItemData        =   "工作表.frx":1486
      Left            =   1560
      List            =   "工作表.frx":148D
      TabIndex        =   3
      Top             =   1440
      Width           =   1455
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0C0&
      Caption         =   "照片"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   3
      Left            =   8280
      TabIndex        =   22
      Top             =   120
      Width           =   480
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0C0&
      Caption         =   "工作情况:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   2
      Left            =   120
      TabIndex        =   2
      Top             =   2640
      Width           =   1200
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0C0&
      Caption         =   "部门:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   1
      Left            =   840
      TabIndex        =   1
      Top             =   1440
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0C0&
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   840
      TabIndex        =   0
      Top             =   720
      Width           =   720
   End
   Begin VB.Menu file 
      Caption         =   "文件"
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu Find 
      Caption         =   "查找"
      Begin VB.Menu Find1 
         Caption         =   "浏览"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Dim AddRecord As Boolean         '定义是否为添加状态的标记
Dim ModifyRecord As Boolean     '定义是否为修改


Private Sub Command1_Click()            ' 增加


On Error GoTo CommandErr

'Picture1.Visible = True

'Picture1.Picture = LoadPicture(App.Path & "\美眉4.jpg")


ClearDisplay                '清除所有文本框内容

Text1.SetFocus          '移光标至文本框text1(0)


DTPicker1.Value = Format(DTPicker1.Value, "YYYY-MM-DD")

Combo2.Text = Format(DTPicker1.Value, "aaaa")



AddRecord = True     '目前是在添加状态

Exit Sub



CommandErr:
  
          MsgBox Err.Description
  




End Sub

Private Sub Command2_Click()  '保存

On Error GoTo CommandError

'Picture1.Visible = True

'Picture1.Picture = LoadPicture(App.Path & "\美眉4.jpg")

If Combo3.Text = "" Or Combo2.Text = "" Then   '如果姓名、星期为空白
                                     '显示错误信息
   MsgBox "姓名与星期字段不可为空白", vbOKOnly + vbExclamation, ""
   
   If Combo3.Text = "" Then  '如果姓名为空白
   
       Combo3.SetFocus   '移动光标至姓名字段
       
   ElseIf Combo2.Text = "" Then
   
      Combo2.SetFocus
   
  
   End If
   
   
   
ElseIf AddRecord = True Then   '窗体在添加状态

⌨️ 快捷键说明

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