VERSION 5.00
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form FrmDiary 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Diary"
   ClientHeight    =   11895
   ClientLeft      =   105
   ClientTop       =   450
   ClientWidth     =   17055
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   9.75
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "FrmDiary.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   11895
   ScaleWidth      =   17055
   StartUpPosition =   3  'Windows Default
   Begin TabDlg.SSTab SSTab1 
      Height          =   11895
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   17055
      _ExtentX        =   30083
      _ExtentY        =   20981
      _Version        =   393216
      TabHeight       =   520
      TabCaption(0)   =   "Day View"
      TabPicture(0)   =   "FrmDiary.frx":048A
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "LblDayFrame"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "LblDay"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "AdodcGrid"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "DataGrid"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "CmdDelete"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "CmdAdd"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).Control(6)=   "TxtDate"
      Tab(0).Control(6).Enabled=   0   'False
      Tab(0).Control(7)=   "CmdAddLost"
      Tab(0).Control(7).Enabled=   0   'False
      Tab(0).Control(8)=   "CmdPrevDay"
      Tab(0).Control(8).Enabled=   0   'False
      Tab(0).Control(9)=   "CmdNextDay"
      Tab(0).Control(9).Enabled=   0   'False
      Tab(0).Control(10)=   "ComboEmployees"
      Tab(0).Control(10).Enabled=   0   'False
      Tab(0).Control(11)=   "FrameTotal"
      Tab(0).Control(11).Enabled=   0   'False
      Tab(0).ControlCount=   12
      TabCaption(1)   =   "Week View"
      TabPicture(1)   =   "FrmDiary.frx":04A6
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "CmdBack"
      Tab(1).Control(1)=   "CmdForward"
      Tab(1).Control(2)=   "VScroll1"
      Tab(1).Control(3)=   "MSHFlexGrid1"
      Tab(1).Control(4)=   "LblDateRange"
      Tab(1).Control(5)=   "LblDateFrame"
      Tab(1).ControlCount=   6
      TabCaption(2)   =   "Month View"
      TabPicture(2)   =   "FrmDiary.frx":04C2
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "LblMonthFrame"
      Tab(2).Control(1)=   "LblMonth"
      Tab(2).Control(2)=   "Frame2"
      Tab(2).Control(3)=   "Frame1"
      Tab(2).Control(4)=   "CmdMonthForward"
      Tab(2).Control(5)=   "CmdMonthBackward"
      Tab(2).Control(6)=   "TxtMonth"
      Tab(2).ControlCount=   7
      Begin VB.Frame FrameTotal 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         ForeColor       =   &H80000008&
         Height          =   495
         Left            =   5880
         TabIndex        =   115
         Top             =   2520
         Width           =   1575
         Begin VB.Label LblTotal 
            Alignment       =   2  'Center
            Appearance      =   0  'Flat
            BackColor       =   &H80000005&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "Total:"
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   375
            Left            =   0
            TabIndex        =   116
            Top             =   0
            Width           =   1335
         End
      End
      Begin VB.ComboBox ComboEmployees 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   450
         Left            =   14280
         TabIndex        =   114
         Top             =   600
         Visible         =   0   'False
         Width           =   2655
      End
      Begin VB.CommandButton CmdNextDay 
         Appearance      =   0  'Flat
         Caption         =   ">"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   10725
         Style           =   1  'Graphical
         TabIndex        =   111
         Top             =   550
         Width           =   375
      End
      Begin VB.CommandButton CmdPrevDay 
         Appearance      =   0  'Flat
         Caption         =   "<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   5985
         Style           =   1  'Graphical
         TabIndex        =   110
         Top             =   550
         Width           =   375
      End
      Begin VB.CommandButton CmdAddLost 
         Caption         =   "Add Lost Time"
         Height          =   495
         Left            =   1920
         TabIndex        =   108
         Top             =   600
         Width           =   1695
      End
      Begin VB.TextBox TxtMonth 
         Height          =   375
         Left            =   -63360
         TabIndex        =   17
         Top             =   600
         Visible         =   0   'False
         Width           =   1095
      End
      Begin VB.CommandButton CmdMonthBackward 
         Appearance      =   0  'Flat
         Caption         =   "<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   -69020
         Style           =   1  'Graphical
         TabIndex        =   14
         Top             =   560
         Width           =   375
      End
      Begin VB.CommandButton CmdMonthForward 
         Appearance      =   0  'Flat
         Caption         =   ">"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   -64280
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   560
         Width           =   375
      End
      Begin VB.TextBox TxtDate 
         Alignment       =   2  'Center
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   11280
         TabIndex        =   9
         Top             =   600
         Visible         =   0   'False
         Width           =   1695
      End
      Begin VB.CommandButton CmdAdd 
         Caption         =   "Add Entry"
         Height          =   495
         Left            =   120
         TabIndex        =   7
         Top             =   600
         Width           =   1695
      End
      Begin VB.CommandButton CmdBack 
         Appearance      =   0  'Flat
         Caption         =   "<"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   -69015
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   550
         Width           =   375
      End
      Begin VB.CommandButton CmdForward 
         Appearance      =   0  'Flat
         Caption         =   ">"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   540
         Left            =   -64275
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   550
         Width           =   375
      End
      Begin VB.CommandButton CmdDelete 
         Caption         =   "Delete Entry"
         Height          =   495
         Left            =   3720
         TabIndex        =   4
         Top             =   600
         Width           =   1695
      End
      Begin VB.VScrollBar VScroll1 
         Height          =   10540
         LargeChange     =   100
         Left            =   -58450
         TabIndex        =   3
         Top             =   1200
         Width           =   375
      End
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1 
         Height          =   10575
         Left            =   -74880
         TabIndex        =   8
         Top             =   1200
         Width           =   16835
         _ExtentX        =   29686
         _ExtentY        =   18653
         _Version        =   393216
         FixedRows       =   0
         FixedCols       =   0
         ScrollTrack     =   -1  'True
         ScrollBars      =   2
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   11.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _NumberOfBands  =   1
         _Band(0).Cols   =   2
         _Band(0).GridLinesBand=   1
         _Band(0).TextStyleBand=   0
         _Band(0).TextStyleHeader=   0
         _Band(0).ColHeader=   1
      End
      Begin MSDataGridLib.DataGrid DataGrid 
         Height          =   10455
         Left            =   120
         TabIndex        =   10
         Top             =   1320
         Width           =   16815
         _ExtentX        =   29660
         _ExtentY        =   18441
         _Version        =   393216
         HeadLines       =   1.5
         RowHeight       =   21
         AllowDelete     =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2057
               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            =   2057
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSAdodcLib.Adodc AdodcGrid 
         Height          =   330
         Left            =   15240
         Top             =   1320
         Visible         =   0   'False
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Frame Frame1 
         Height          =   10575
         Left            =   -74885
         TabIndex        =   2
         Top             =   1200
         Width           =   16815
         Begin VB.Label LblTu 
            AutoSize        =   -1  'True
            Caption         =   "Tu"
            Height          =   240
            Left            =   3480
            TabIndex        =   113
            Top             =   210
            Width           =   240
         End
         Begin VB.Label LblSu 
            AutoSize        =   -1  'True
            Caption         =   "Su"
            Height          =   240
            Left            =   15480
            TabIndex        =   1
            Top             =   210
            Width           =   255
         End
         Begin VB.Label LblSa 
            AutoSize        =   -1  'True
            Caption         =   "Sa"
            Height          =   240
            Left            =   13080
            TabIndex        =   100
            Top             =   210
            Width           =   255
         End
         Begin VB.Label LblFr 
            AutoSize        =   -1  'True
            Caption         =   "Fr"
            Height          =   240
            Left            =   10680
            TabIndex        =   99
            Top             =   210
            Width           =   195
         End
         Begin VB.Label LblTh 
            AutoSize        =   -1  'True
            Caption         =   "Th"
            Height          =   240
            Left            =   8300
            TabIndex        =   98
            Top             =   210
            Width           =   240
         End
         Begin VB.Label LblWe 
            AutoSize        =   -1  'True
            Caption         =   "We"
            Height          =   240
            Left            =   5880
            TabIndex        =   97
            Top             =   210
            Width           =   315
         End
         Begin VB.Label LblMo 
            AutoSize        =   -1  'True
            Caption         =   "Mo"
            Height          =   240
            Left            =   1005
            TabIndex        =   96
            Top             =   210
            Width           =   285
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   34
            Left            =   14520
            TabIndex        =   52
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   27
            Left            =   14520
            TabIndex        =   51
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   20
            Left            =   14520
            TabIndex        =   50
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   13
            Left            =   14520
            TabIndex        =   49
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   6
            Left            =   14520
            TabIndex        =   48
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   33
            Left            =   12120
            TabIndex        =   47
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   26
            Left            =   12120
            TabIndex        =   46
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   19
            Left            =   12120
            TabIndex        =   45
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   12
            Left            =   12120
            TabIndex        =   44
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   5
            Left            =   12120
            TabIndex        =   43
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   32
            Left            =   9720
            TabIndex        =   42
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   25
            Left            =   9720
            TabIndex        =   41
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   18
            Left            =   9720
            TabIndex        =   40
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   11
            Left            =   9720
            TabIndex        =   39
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   4
            Left            =   9720
            TabIndex        =   38
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   31
            Left            =   7320
            TabIndex        =   37
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   24
            Left            =   7320
            TabIndex        =   36
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   17
            Left            =   7320
            TabIndex        =   35
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   10
            Left            =   7320
            TabIndex        =   34
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   3
            Left            =   7320
            TabIndex        =   33
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   30
            Left            =   4920
            TabIndex        =   32
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   23
            Left            =   4920
            TabIndex        =   31
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   16
            Left            =   4920
            TabIndex        =   30
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   9
            Left            =   4920
            TabIndex        =   29
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   2
            Left            =   4920
            TabIndex        =   28
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   29
            Left            =   2520
            TabIndex        =   27
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   22
            Left            =   2520
            TabIndex        =   26
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   15
            Left            =   2520
            TabIndex        =   25
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   8
            Left            =   2520
            TabIndex        =   24
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   1
            Left            =   2520
            TabIndex        =   23
            Top             =   480
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   28
            Left            =   120
            TabIndex        =   22
            Top             =   8640
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   21
            Left            =   120
            TabIndex        =   21
            Top             =   6600
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   14
            Left            =   120
            TabIndex        =   20
            Top             =   4560
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   7
            Left            =   120
            TabIndex        =   19
            Top             =   2520
            Width           =   2175
         End
         Begin VB.Label Label 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   11.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1815
            Index           =   0
            Left            =   120
            TabIndex        =   18
            Top             =   480
            Width           =   2175
         End
      End
      Begin VB.Frame Frame2 
         Height          =   10575
         Left            =   -74885
         TabIndex        =   53
         Top             =   1200
         Width           =   16815
         Begin VB.Label LblMon 
            AutoSize        =   -1  'True
            Caption         =   "Mo"
            Height          =   240
            Left            =   1000
            TabIndex        =   107
            Top             =   300
            Width           =   285
         End
         Begin VB.Label LblTue 
            AutoSize        =   -1  'True
            Caption         =   "Tu"
            Height          =   240
            Left            =   3400
            TabIndex        =   106
            Top             =   300
            Width           =   240
         End
         Begin VB.Label LblWed 
            AutoSize        =   -1  'True
            Caption         =   "We"
            Height          =   240
            Left            =   5880
            TabIndex        =   105
            Top             =   300
            Width           =   315
         End
         Begin VB.Label LblThu 
            AutoSize        =   -1  'True
            Caption         =   "Th"
            Height          =   240
            Left            =   8300
            TabIndex        =   104
            Top             =   300
            Width           =   240
         End
         Begin VB.Label LblFri 
            AutoSize        =   -1  'True
            Caption         =   "Fr"
            Height          =   240
            Left            =   10680
            TabIndex        =   103
            Top             =   300
            Width           =   195
         End
         Begin VB.Label LblSat 
            AutoSize        =   -1  'True
            Caption         =   "Sa"
            Height          =   240
            Left            =   13000
            TabIndex        =   102
            Top             =   300
            Width           =   255
         End
         Begin VB.Label LblSun 
            AutoSize        =   -1  'True
            Caption         =   "Su"
            Height          =   240
            Left            =   15450
            TabIndex        =   101
            Top             =   300
            Width           =   255
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   28
            Left            =   120
            TabIndex        =   95
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   21
            Left            =   120
            TabIndex        =   94
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   14
            Left            =   120
            TabIndex        =   93
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   7
            Left            =   120
            TabIndex        =   92
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   0
            Left            =   120
            TabIndex        =   91
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   35
            Left            =   120
            TabIndex        =   90
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   29
            Left            =   2520
            TabIndex        =   89
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   22
            Left            =   2520
            TabIndex        =   88
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   15
            Left            =   2520
            TabIndex        =   87
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   8
            Left            =   2520
            TabIndex        =   86
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   1
            Left            =   2520
            TabIndex        =   85
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   36
            Left            =   2520
            TabIndex        =   84
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   30
            Left            =   4920
            TabIndex        =   83
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   23
            Left            =   4920
            TabIndex        =   82
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   16
            Left            =   4920
            TabIndex        =   81
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   9
            Left            =   4920
            TabIndex        =   80
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   2
            Left            =   4920
            TabIndex        =   79
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   37
            Left            =   4920
            TabIndex        =   78
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   31
            Left            =   7320
            TabIndex        =   77
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   24
            Left            =   7320
            TabIndex        =   76
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   17
            Left            =   7320
            TabIndex        =   75
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   10
            Left            =   7320
            TabIndex        =   74
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   3
            Left            =   7320
            TabIndex        =   73
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   38
            Left            =   7320
            TabIndex        =   72
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   32
            Left            =   9720
            TabIndex        =   71
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   25
            Left            =   9720
            TabIndex        =   70
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   18
            Left            =   9720
            TabIndex        =   69
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   11
            Left            =   9720
            TabIndex        =   68
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   4
            Left            =   9720
            TabIndex        =   67
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   39
            Left            =   9720
            TabIndex        =   66
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   33
            Left            =   12120
            TabIndex        =   65
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   26
            Left            =   12120
            TabIndex        =   64
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   19
            Left            =   12120
            TabIndex        =   63
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   12
            Left            =   12120
            TabIndex        =   62
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   5
            Left            =   12120
            TabIndex        =   61
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   40
            Left            =   12120
            TabIndex        =   60
            Top             =   9000
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   34
            Left            =   14520
            TabIndex        =   59
            Top             =   7320
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   27
            Left            =   14520
            TabIndex        =   58
            Top             =   5640
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   20
            Left            =   14520
            TabIndex        =   57
            Top             =   3960
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   13
            Left            =   14520
            TabIndex        =   56
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   6
            Left            =   14520
            TabIndex        =   55
            Top             =   600
            Width           =   2175
         End
         Begin VB.Label Label1 
            Appearance      =   0  'Flat
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "Arial"
               Size            =   9.75
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H80000008&
            Height          =   1455
            Index           =   41
            Left            =   14520
            TabIndex        =   54
            Top             =   9000
            Width           =   2175
         End
      End
      Begin VB.Label LblDay 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   6630
         TabIndex        =   112
         Top             =   660
         Width           =   3795
      End
      Begin VB.Label LblDayFrame 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   18
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   585
         Left            =   5955
         TabIndex        =   109
         Top             =   530
         Width           =   5175
      End
      Begin VB.Label LblMonth 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   15.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   400
         Left            =   -68355
         TabIndex        =   15
         Top             =   640
         Width           =   3795
      End
      Begin VB.Label LblDateRange 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   -68370
         TabIndex        =   11
         Top             =   660
         Width           =   3795
      End
      Begin VB.Label LblMonthFrame 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   18
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   585
         Left            =   -69045
         TabIndex        =   16
         Top             =   530
         Width           =   5175
      End
      Begin VB.Label LblDateFrame 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   1  'Fixed Single
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   18
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   585
         Left            =   -69045
         TabIndex        =   12
         Top             =   530
         Width           =   5175
      End
   End
End
Attribute VB_Name = "FrmDiary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub CmdAdd_Click()
    FrmAddEntry.Left = Me.Left
    FrmAddEntry.Top = Me.Top
    FrmAddEntry.Show 1
End Sub

Private Sub CmdAddLost_Click()
    FrmAddLost.Left = Me.Left
    FrmAddLost.Top = Me.Top
    FrmAddLost.Show 1
End Sub

Private Sub CmdBack_Click()
Dim StartDate As String, EndDate As String
    StartDate = Mid(LblDateRange.Caption, 1, 10)
    StartDate = DateAdd("d", -7, StartDate)
    Call PrintWeek(StartDate)
End Sub

Private Sub CmdDelete_Click()
    If AdodcGrid.Recordset.EOF = False Then
        If InBox("Please type ""Yes"" to confirm entry deletion.", "Delete Entry", "Confirm", Me.Left, Me.Top) = "Yes" Then
            AdodcGrid.Recordset.Delete
        End If
    End If
End Sub

Private Sub CmdForward_Click()
Dim StartDate As String, EndDate As String
    StartDate = Mid(LblDateRange.Caption, 1, 10)
    StartDate = DateAdd("d", 7, StartDate)
    Call PrintWeek(StartDate)
End Sub

Private Sub CmdMonthBackward_Click()
TxtMonth.Text = DateAdd("m", -1, TxtMonth.Text)
LblMonth.Caption = MonthName(Month(TxtMonth.Text)) & " " & Year(TxtMonth.Text)
Call WriteDays
End Sub

Private Sub CmdMonthForward_Click()
TxtMonth.Text = DateAdd("m", 1, TxtMonth.Text)
LblMonth.Caption = MonthName(Month(TxtMonth.Text)) & " " & Year(TxtMonth.Text)
Call WriteDays
End Sub
Private Sub WriteDays()
Dim NumDays As Integer, i As Integer, DayNum As Integer, Small As Boolean
Dim Hours As Single

    NumDays = Day(DateAdd("m", 1, TxtMonth.Text) - 1)
    DayNum = Weekday(TxtMonth.Text, vbMonday)
    Select Case NumDays
        Case Is <= 29
            Small = True
        Case Is = 30
            If DayNum <= 6 Then
                Small = True
            Else
                Small = False
            End If
        Case Is = 31
            If DayNum <= 5 Then
                Small = True
            Else
                Small = False
            End If
    End Select
    
    If Small = True Then
        For i = 0 To 34
            Label(i).Caption = " " & Day(DateAdd("d", (DayNum - 1) * -1, TxtMonth.Text) + i) & "."
            Label(i).BackColor = &HE0E0E0
        Next
        For i = 0 To (NumDays - 1)
            Call SetTiles(i, DayNum, Label, 4)
        Next
        Frame1.Visible = True
        Frame2.Visible = False
    Else
        For i = 0 To 41
            Label1(i).Caption = " " & Day(DateAdd("d", (DayNum - 1) * -1, TxtMonth.Text) + i) & "."
            Label1(i).BackColor = &HE0E0E0
        Next
        For i = 0 To (NumDays - 1)
            Call SetTiles(i, DayNum, Label1, 3)
        Next
        Frame2.Visible = True
        Frame1.Visible = False
    End If

End Sub
Private Sub SetTiles(i As Integer, DayNum As Integer, Lab As Variant, Limit As Integer)
Dim TileDate As Date, Hours As Single, Counter As Integer, Warning As Boolean
    Lab(i + (DayNum - 1)).Caption = " " & (i + 1) & "."
    TileDate = Format((i + 1), "00") & Mid(TxtMonth.Text, 3)
    Call CreateRecordSet("SELECT * FROM Diary" & CurrentUser & " WHERE Date='" & Format(TileDate, "YYYY-MM-DD") & "'", adOpenForwardOnly, adLockReadOnly)
    Hours = 0
    While Not rs.EOF
        If (IsNull(rs!Hours)) Or (rs!Hours = 0) Then
            Warning = True
        Else
            Hours = Hours + rs!Hours
        End If
        If Counter < Limit Then
            If rs!AlphaRef = "" Then
                Lab(i + (DayNum - 1)).Caption = Lab(i + (DayNum - 1)).Caption & vbCrLf & "           Lost Time"
            Else
                Lab(i + (DayNum - 1)).Caption = Lab(i + (DayNum - 1)).Caption & vbCrLf & "            " & rs!AlphaRef
            End If
            Counter = Counter + 1
        End If
        rs.MoveNext
    Wend
    If Counter < rs.RecordCount Then
        Lab(i + (DayNum - 1)).Caption = Lab(i + (DayNum - 1)).Caption & "..."
    End If
    Lab(i + (DayNum - 1)).Caption = Lab(i + (DayNum - 1)).Caption & vbCrLf & "            Hours: " & Hours
    If Hours > 24 Or Hours < 8 Then
        Lab(i + (DayNum - 1)).BackColor = RGB(255, 153, 153)
    Else
        Lab(i + (DayNum - 1)).BackColor = RGB(152, 251, 152)
    End If
    If Warning = True Then
        Lab(i + (DayNum - 1)).BackColor = RGB(255, 178, 102)
        Lab(i + (DayNum - 1)).ToolTipText = "An entry may have missing hours"
    End If
End Sub

Private Sub CmdNextDay_Click()
    TxtDate.Text = DateAdd("d", 1, TxtDate.Text)
End Sub

Private Sub CmdPrevDay_Click()
    TxtDate.Text = DateAdd("d", -1, TxtDate.Text)
End Sub

Private Sub DataGrid_AfterColUpdate(ByVal ColIndex As Integer)
    AdodcGrid.Recordset.Update          'Update database once column has been edited
End Sub

Private Sub DataGrid_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)
Dim Dif As Single, Total As Single
    If ColIndex = 4 Then
        If (Not IsNumeric(DataGrid.Text)) Or (CSng(DataGrid.Text) < 0) Then
            MsgBox "Please enter only positive numeric values.", vbExclamation
            Cancel = True
        Else
            DataGrid.Columns(4).Value = CStr(Int((CSng(DataGrid.Columns(4).Value) + 0.25) * 4) / 4)
            Total = CSng(Mid(LblTotal.Caption, 7))
            Dif = CSng(DataGrid.Text) - OldValue
            Total = Total + Dif
            LblTotal.Caption = "Total: " & Total
        End If
    End If
End Sub

Private Sub DataGrid_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyDelete Then
        If InBox("Please type ""Yes"" to confirm entry deletion.", "Delete Entry", "Confirm", Me.Left, Me.Top) = "Yes" Then
            AdodcGrid.Recordset.Delete
        Else
            KeyCode = 0
        End If
    End If
End Sub

Private Sub DataGrid_RowResize(Cancel As Integer)
    LblTotal.Height = DataGrid.RowHeight
    FrameTotal.Height = DataGrid.RowHeight
    FrameTotal.Top = DataGrid.Top + 410 + (DataGrid.RowHeight * DataGrid.VisibleRows)
End Sub

Private Sub Form_Load()
Dim SQL As String
    Me.Caption = "Diary - " & CurrentUser
    SSTab1.Tab = 0
    AdodcGrid.ConnectionString = ConString
    DataGrid.RowHeight = 310
    TxtDate.Text = Date
    LblTotal.Height = DataGrid.RowHeight + 20
    FrameTotal.Height = DataGrid.RowHeight + 20
    LblTotal.Width = 1360
    FrameTotal.Width = 1360
    FrameTotal.Left = 15570
    FrameTotal.Top = DataGrid.Top + 410 + (DataGrid.RowHeight * DataGrid.VisibleRows)
End Sub
Private Sub CentreHeaders()
Dim W As Long
Dim SpaceWidth As Long
Dim NumOfSpaces As Long
Dim i As Integer
    'Insert spaces into column headers to align centre (workaround)
    For i = 1 To 5
        With DataGrid
          SpaceWidth = Me.TextWidth(" ")
          W = .Columns(i).Width
          NumOfSpaces = (W - Me.TextWidth(.Columns(i).Caption)) \ SpaceWidth \ 2
          .Columns(i).Caption = Space$(NumOfSpaces) & .Columns(i).Caption
        End With
    Next
End Sub

Private Sub Label_Click(Index As Integer)
    Call TileClick(Index, Label)
End Sub

Private Sub Label1_Click(Index As Integer)
    Call TileClick(Index, Label1)
End Sub
Private Sub TileClick(Index As Integer, Lab As Variant)
Dim TileDate As Date, TileNum As Integer
    TileNum = Mid(Lab(Index).Caption, 2, (InStr(1, Lab(Index).Caption, ".") - 2))
    TileDate = Format(TileNum, "00") & Mid(TxtMonth.Text, 3)
    If TileNum > (Index + 1) Then
        TileDate = DateAdd("m", -1, TileDate)
    End If
    If (TileNum + 7) < Index Then
        TileDate = DateAdd("m", 1, TileDate)
    End If
    TxtDate.Text = TileDate
    SSTab1.Tab = 0
End Sub


Private Sub MSHFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim DayOfWeek As String, DayNumber As Integer, DateFind As Date, WeekStart As Date

    With MSHFlexGrid1
        If Y > (.RowHeight(0)) Then
            .Col = 0
            While .CellBackColor <> RGB(206, 233, 234)
                .Row = .Row - 1
            Wend
            DayOfWeek = Left(.Text, Len(.Text) - 1)
            Select Case DayOfWeek
                Case "Monday"
                    DayNumber = 1
                Case "Tuesday"
                    DayNumber = 2
                Case "Wednesday"
                    DayNumber = 3
                Case "Thursday"
                    DayNumber = 4
                Case "Friday"
                    DayNumber = 5
                Case "Saturday"
                    DayNumber = 6
                Case "Sunday"
                    DayNumber = 7
            End Select
            WeekStart = Mid(LblDateRange.Caption, 1, 10)
            DateFind = DateAdd("d", DayNumber - 1, WeekStart)
            TxtDate.Text = DateFind
            SSTab1.Tab = 0
        End If
    End With
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
Dim StartDate As String, DayOfWeek As Integer, i As Integer
    If SSTab1.Tab = 1 Then
        DayOfWeek = Datepart("w", Date)                                                 'Get start of current week
        StartDate = Format(DateAdd("d", (DayOfWeek - 2) * (-1), Date), "yyyy-mm-dd")
        Call PrintWeek(StartDate)
    End If
    If SSTab1.Tab = 2 Then
        LblMonth.Caption = MonthName(Month(Date)) & " " & Year(Date)
        TxtMonth.Text = "01/" & Format(Month(Date), "00") & "/" & Year(Date)
        Call WriteDays
    End If
End Sub

Private Sub PrintWeek(StartDate As String)
Dim EndDate As String, DayDate As String, TotalHours As Single
Dim SQL As String, i As Integer, Counter As Integer, DayOfWeek As Integer
    MSHFlexGrid1.Visible = False
    With MSHFlexGrid1
        .Rows = 2                       'Set up/configure flex grid
        .Cols = 5
        .ColWidth(0) = 1450
        .ColWidth(1) = 1450
        .ColWidth(2) = 4000
        .ColWidth(3) = 8020
        .ColWidth(4) = 1450
        .TextMatrix(0, 0) = "Day"
        .TextMatrix(0, 1) = "AlphaRef"
        .TextMatrix(0, 2) = "Customer"
        .TextMatrix(0, 3) = "Description"
        .TextMatrix(0, 4) = "Hours"
        For i = 0 To 4                          'Centre the columns and headers
            .ColAlignment(i) = 3
            .ColAlignmentHeader(0, i) = 4
        Next
        EndDate = DateAdd("d", 6, StartDate)
        LblDateRange.Caption = Format(StartDate, "dd/mm/yyyy") & " - " & EndDate
        For i = 0 To 6
            TotalHours = 0
            DayOfWeek = Weekday(DateAdd("d", i, StartDate), vbMonday)
            .TextMatrix((.Rows - 1), 0) = WeekdayName(DayOfWeek, , vbMonday) & ":"
            For Counter = 0 To 4
                .Row = .Rows - 1
                .Col = Counter
                .CellBackColor = RGB(206, 233, 234)
            Next
            .Rows = .Rows + 1
            DayDate = Format(DateAdd("d", i, StartDate), "yyyy-mm-dd")
            SQL = "SELECT * FROM Diary" & CurrentUser & " WHERE Date='" & DayDate & "'"
            Call CreateRecordSet(SQL, adOpenForwardOnly, adLockReadOnly)
            .Col = 4
            While Not rs.EOF
                .TextMatrix((.Rows - 1), 1) = ConvertNull(rs!AlphaRef)
                .TextMatrix((.Rows - 1), 2) = ConvertNull(rs!Customer)
                .TextMatrix((.Rows - 1), 3) = ConvertNull(rs!Description)
                .TextMatrix((.Rows - 1), 4) = ConvertNull(rs!Hours)
                If IsNull(rs!Hours) Then
                    .Row = .Rows - 1
                    .CellBackColor = RGB(255, 178, 102)
                Else
                    TotalHours = TotalHours + rs!Hours
                End If
                .Rows = .Rows + 1
                rs.MoveNext
            Wend
            .Row = .Rows - 1
            If TotalHours > 24 Or TotalHours < 8 Then
                .CellBackColor = RGB(255, 153, 153)
            Else
                .CellBackColor = RGB(152, 251, 152)
            End If
            .CellAlignment = 3
            .Text = "Total: " & CStr(TotalHours)
            If i <> 6 Then
                .Rows = .Rows + 1
            End If
        Next
    End With
    MSHFlexGrid1.Visible = True
    Call HideShowScrollBar
End Sub
Private Function ConvertNull(ConvertText As Variant) As String
    If IsNull(ConvertText) Then
        ConvertText = ""                      'Function to convert nulls to zero length strings
    End If
    ConvertNull = ConvertText
End Function
Private Sub HideShowScrollBar()
Dim Ratio As Single
    Ratio = 35 / MSHFlexGrid1.Rows
    If Ratio >= 1 Then                                                  'Hide/show scroll bar if needed
        MSHFlexGrid1.ColWidth(0) = MSHFlexGrid1.ColWidth(0) + 75
        MSHFlexGrid1.ColWidth(1) = MSHFlexGrid1.ColWidth(1) + 75
        MSHFlexGrid1.ColWidth(2) = MSHFlexGrid1.ColWidth(2) + 75
        MSHFlexGrid1.ColWidth(3) = MSHFlexGrid1.ColWidth(3) + 75
        MSHFlexGrid1.ColWidth(4) = MSHFlexGrid1.ColWidth(4) + 75
        VScroll1.Visible = False
    Else
        VScroll1.Visible = True
        VScroll1.SmallChange = MSHFlexGrid1.Height
        VScroll1.LargeChange = (MSHFlexGrid1.Height / 5)
        VScroll1.Max = Int(300 / Ratio)
        VScroll1.TabStop = False
    End If
End Sub


Private Sub TxtDate_Change()
    LblDay.Caption = Format(TxtDate.Text, "ddd dd mmm yyyy")    'Format date for caption
    
    'Refresh database once date has been moved to find entries for that date
    AdodcGrid.RecordSource = "SELECT * FROM Diary" & CurrentUser & " WHERE Date='" & Format(TxtDate.Text, "YYYY-MM-DD") & "' " & "ORDER BY [Index] ASC;"
    AdodcGrid.Refresh
    Set DataGrid.DataSource = AdodcGrid.Recordset
    
    DataGrid.Columns(0).Visible = False                 'Set column properties (day view)
    DataGrid.Columns(5).Visible = False
    DataGrid.Columns(1).Alignment = dbgCenter
    DataGrid.Columns(2).Alignment = dbgCenter
    DataGrid.Columns(3).Alignment = dbgCenter
    DataGrid.Columns(4).Alignment = dbgCenter
    'DataGrid.Columns(5).Alignment = dbgCenter
    
    DataGrid.Columns(1).Locked = True
    DataGrid.Columns(2).Locked = True
    
    DataGrid.Columns(1).Width = 1450
    DataGrid.Columns(2).Width = 5000
    DataGrid.Columns(3).Width = 8678
    'DataGrid.Columns(3).Width = 7500
    DataGrid.Columns(4).Width = 1350
    Call CentreHeaders                                  'Call subroutine to centre the headings of columns
    Call SetTotalBox
End Sub
Private Sub SetTotalBox()
Dim TotalHours As Single, i As Integer
    If AdodcGrid.Recordset.RecordCount = 0 Then
        FrameTotal.Top = DataGrid.Top + 395 + (DataGrid.RowHeight)
        LblTotal.Caption = "Total: 0"
    Else
        FrameTotal.Top = DataGrid.Top + 400 + (DataGrid.RowHeight * AdodcGrid.Recordset.RecordCount)
        For i = 0 To (DataGrid.VisibleRows - 1)
            DataGrid.Row = i
            If Not IsNull(DataGrid.Columns(4).CellValue(DataGrid.Bookmark)) Then
                TotalHours = TotalHours + DataGrid.Columns(4).CellValue(DataGrid.Bookmark)
            End If
        Next
        LblTotal.Caption = "Total: " & TotalHours
    End If
End Sub
Private Sub VScroll1_Change()
Dim Ratio As Single
    Ratio = VScroll1.Value / VScroll1.Max                               'Scroll flex grid when scroll bar is scrolled
    MSHFlexGrid1.TopRow = (Int(Ratio * (MSHFlexGrid1.Rows - 35)))
End Sub

Private Sub VScroll1_Scroll()
    VScroll1_Change
End Sub
