frmEdit.frm

 VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmEdit
   BackColor       =   &H8000000E&
   Caption         =   "Student Record"
   ClientHeight    =   8940
   ClientLeft      =   60
   ClientTop       =   375
   ClientWidth     =   10425
   LinkTopic       =   "Form1"
   Moveable        =   0   'False
   ScaleHeight     =   8940
   ScaleWidth      =   10425
   StartUpPosition =   2  'CenterScreen
   Begin MSDataGridLib.DataGrid DataGrid1
      Bindings        =   "frmEdit.frx":0000
      Height          =   2295
      Left            =   240
      TabIndex        =   45
      Top             =   840
      Width           =   9855
      _ExtentX        =   17383
      _ExtentY        =   4048
      _Version        =   393216
      BackColor       =   -2147483625
      ForeColor       =   -2147483624
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   10
      BeginProperty Column00
         DataField       =   "SN"
         Caption         =   "SN"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01
         DataField       =   "LN"
         Caption         =   "LN"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02
         DataField       =   "FN"
         Caption         =   "FN"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03
         DataField       =   "MI"
         Caption         =   "MI"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04
         DataField       =   "DOB"
         Caption         =   "DOB"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05
         DataField       =   "ADD"
         Caption         =   "ADD"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06
         DataField       =   "CN"
         Caption         =   "CN"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07
         DataField       =   "COURSE"
         Caption         =   "COURSE"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08
         DataField       =   "YEARLEV"
         Caption         =   "YEARLEV"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09
         DataField       =   "Picture"
         Caption         =   "Picture"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   1033
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0
         BeginProperty Column00
            ColumnWidth     =   915.024
         EndProperty
         BeginProperty Column01
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column02
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column03
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column04
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column05
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column06
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column07
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column08
            ColumnWidth     =   1739.906
         EndProperty
         BeginProperty Column09
            ColumnWidth     =   1739.906
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command1
      Caption         =   "Retrieve the Photo"
      Height          =   255
      Left            =   8520
      TabIndex        =   43
      Top             =   3840
      Width           =   1695
   End
   Begin VB.CommandButton cmdPicShow
      Height          =   375
      Left            =   6240
      Style           =   1  'Graphical
      TabIndex        =   39
      ToolTipText     =   "View Picture"
      Top             =   7200
      Width           =   495
   End
   Begin VB.CommandButton cmdPicInsert
      Height          =   375
      Left            =   6240
      Style           =   1  'Graphical
      TabIndex        =   38
      ToolTipText     =   "Browse for a picture to store in the database..."
      Top             =   6840
      Width           =   495
   End
   Begin VB.CommandButton cmdPicSave
      Height          =   375
      Left            =   8400
      Style           =   1  'Graphical
      TabIndex        =   37
      ToolTipText     =   "Save Picture in a file..."
      Top             =   6960
      Width           =   495
   End
   Begin VB.Timer Timer2
      Interval        =   5
      Left            =   2280
      Top             =   7920
   End
   Begin VB.Timer Timer1
      Left            =   2280
      Top             =   8280
   End
   Begin VB.Frame fraNavigation
      BackColor       =   &H8000000E&
      Height          =   800
      Left            =   240
      TabIndex        =   29
      Top             =   7920
      Width           =   1725
      Begin VB.TextBox txtcount
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H8000000F&
         BorderStyle     =   0  'None
         BeginProperty Font
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   285
         Left            =   120
         TabIndex        =   34
         Top             =   480
         Width           =   615
      End
      Begin VB.CommandButton cmdNavigate
         Height          =   265
         Index           =   0
         Left            =   30
         Style           =   1  'Graphical
         TabIndex        =   33
         Top             =   120
         Width           =   400
      End
      Begin VB.CommandButton cmdNavigate
         Height          =   265
         Index           =   1
         Left            =   480
         Style           =   1  'Graphical
         TabIndex        =   32
         Top             =   120
         Width           =   400
      End
      Begin VB.CommandButton cmdNavigate
         Height          =   265
         Index           =   2
         Left            =   840
         Style           =   1  'Graphical
         TabIndex        =   31
         Top             =   120
         Width           =   400
      End
      Begin VB.CommandButton cmdNavigate
         Height          =   265
         Index           =   3
         Left            =   1320
         Style           =   1  'Graphical
         TabIndex        =   30
         Top             =   120
         Width           =   400
      End
      Begin VB.Label lblmax
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         BeginProperty Font
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   285
         Left            =   1080
         TabIndex        =   36
         Top             =   480
         Width           =   705
      End
      Begin VB.Label Label12
         BackStyle       =   0  'Transparent
         Caption         =   "  of"
         BeginProperty Font
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   720
         TabIndex        =   35
         Top             =   480
         Width           =   255
      End
   End
   Begin VB.CommandButton cmdOperations
      Height          =   615
      Index           =   2
      Left            =   7920
      Picture         =   "frmEdit.frx":0015
      Style           =   1  'Graphical
      TabIndex        =   26
      Top             =   7920
      Width           =   615
   End
   Begin VB.CommandButton cmdRefresh
      Height          =   615
      Left            =   8760
      Picture         =   "frmEdit.frx":0514
      Style           =   1  'Graphical
      TabIndex        =   22
      Top             =   7920
      Width           =   615
   End
   Begin VB.CommandButton cmdSelect
      Default         =   -1  'True
      Height          =   615
      Left            =   -1800
      Style           =   1  'Graphical
      TabIndex        =   21
      Top             =   8280
      Width           =   615
   End
   Begin VB.CommandButton cmdClose
      Cancel          =   -1  'True
      Height          =   615
      Left            =   9600
      Picture         =   "frmEdit.frx":0921
      Style           =   1  'Graphical
      TabIndex        =   20
      Top             =   7920
      Width           =   615
   End
   Begin VB.CommandButton cmdAMod
      Height          =   615
      Index           =   0
      Left            =   6840
      Picture         =   "frmEdit.frx":0DB5
      Style           =   1  'Graphical
      TabIndex        =   19
      Top             =   7920
      Width           =   615
   End
   Begin VB.TextBox txtSN
      Height          =   285
      Left            =   2160
      TabIndex        =   9
      Top             =   3840
      Width           =   1215
   End
   Begin VB.TextBox txtLN
      Height          =   285
      Left            =   240
      TabIndex        =   8
      Top             =   4320
      Width           =   2415
   End
   Begin VB.TextBox txtFN
      Height          =   285
      Left            =   2760
      TabIndex        =   7
      Top             =   4320
      Width           =   2415
   End
   Begin VB.TextBox txtMI
      Height          =   285
      Left            =   5280
      TabIndex        =   6
      Top             =   4320
      Width           =   615
   End
   Begin VB.ComboBox cmbCourse
      Height          =   315
      Left            =   960
      TabIndex        =   5
      Top             =   5280
      Width           =   1455
   End
   Begin VB.ComboBox cmbYear
      Height          =   315
      Left            =   4320
      TabIndex        =   4
      Top             =   5280
      Width           =   1095
   End
   Begin VB.TextBox txtAdd
      Height          =   855
      Left            =   1320
      MultiLine       =   -1  'True
      TabIndex        =   2
      Top             =   6240
      Width           =   3975
   End
   Begin VB.TextBox txtCN
      Height          =   285
      Left            =   2160
      TabIndex        =   1
      Top             =   7200
      Width           =   3255
   End
   Begin MSComCtl2.DTPicker DTDOB
      Height          =   255
      Left            =   1800
      TabIndex        =   3
      Top             =   5880
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   450
      _Version        =   393216
      Format          =   61210625
      CurrentDate     =   40171
   End
   Begin Viray.Photo Photo1
      Height          =   2655
      Left            =   6360
      TabIndex        =   44
      Top             =   4080
      Width           =   3855
      _ExtentX        =   6800
      _ExtentY        =   4683
   End
   Begin MSAdodcLib.Adodc Adodc1
      Height          =   330
      Left            =   4080
      Top             =   1680
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=viray.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=viray.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "tblViray"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "View Picture"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   17
      Left            =   6840
      TabIndex        =   42
      Top             =   7320
      Width           =   1695
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Browse Picture"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   16
      Left            =   6840
      TabIndex        =   41
      Top             =   6960
      Width           =   1695
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Save Picture"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   15
      Left            =   9000
      TabIndex        =   40
      Top             =   7080
      Width           =   1695
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Choose a Record to be Edit"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   14
      Left            =   240
      TabIndex        =   28
      Top             =   3240
      Width           =   2415
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Update"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   13
      Left            =   7920
      TabIndex        =   27
      Top             =   8520
      Width           =   735
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Edit"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   12
      Left            =   6960
      TabIndex        =   25
      Top             =   8520
      Width           =   495
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Cancel"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   11
      Left            =   8760
      TabIndex        =   24
      Top             =   8520
      Width           =   615
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Exit"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   1
      Left            =   9720
      TabIndex        =   23
      Top             =   8520
      Width           =   375
   End
   Begin VB.Line Line3
      X1              =   240
      X2              =   10200
      Y1              =   7800
      Y2              =   7800
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Contact Number"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   2
      Left            =   240
      TabIndex        =   18
      Top             =   7200
      Width           =   1695
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Address"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   3
      Left            =   240
      TabIndex        =   17
      Top             =   6240
      Width           =   855
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Date of Birth"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   4
      Left            =   240
      TabIndex        =   16
      Top             =   5880
      Width           =   1335
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Year Level"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   5
      Left            =   3000
      TabIndex        =   15
      Top             =   5280
      Width           =   1095
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Course"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   6
      Left            =   240
      TabIndex        =   14
      Top             =   5280
      Width           =   735
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "MI"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   7
      Left            =   5400
      TabIndex        =   13
      Top             =   4680
      Width           =   375
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "First Name"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   8
      Left            =   3480
      TabIndex        =   12
      Top             =   4680
      Width           =   975
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "LastName"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   9
      Left            =   960
      TabIndex        =   11
      Top             =   4680
      Width           =   1095
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Student Number:"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   10
      Left            =   240
      TabIndex        =   10
      Top             =   3840
      Width           =   1695
   End
   Begin VB.Line Line2
      X1              =   120
      X2              =   10080
      Y1              =   3600
      Y2              =   3600
   End
   Begin VB.Line Line1
      X1              =   120
      X2              =   10200
      Y1              =   720
      Y2              =   720
   End
   Begin VB.Image Image1
      Height          =   540
      Left            =   360
      Picture         =   "frmEdit.frx":11DA
      Top             =   120
      Width           =   480
   End
   Begin VB.Label Label1
      BackColor       =   &H8000000E&
      Caption         =   "Edit Record"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   0
      Left            =   1080
      TabIndex        =   0
      Top             =   120
      Width           =   2055
   End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RS As New ADODB.Recordset
Dim cn As New ADODB.Connection

Private WithEvents ctrl As TextBox
Attribute ctrl.VB_VarHelpID = -1
Private WithEvents ctr  As ComboBox
Attribute ctr.VB_VarHelpID = -1

Private Sub cmdAMod_Click(Index As Integer)
Unlocker
cmdOperations(2).Enabled = True
cmdRefresh.Enabled = True
cmdPicInsert.Enabled = True
cmdPicShow.Enabled = True
cmdPicSave.Enabled = True
cmbCourse.Enabled = True
cmbYear.Enabled = True
Timer1.Enabled = True
End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdNavigate_Click(Index As Integer)
Navigate Index, RS
    DisplayRecords
End Sub

Private Sub cmdOperations_Click(Index As Integer)
    RS("SN") = txtSN.Text
    RS("LN") = txtLN.Text
    RS("FN") = txtFN.Text
    RS("MI") = txtMI.Text
    RS("COURSE") = cmbCourse.Text
    RS("YEARLEV") = cmbYear.Text
    RS("DOB") = DTDOB.Value
    RS("ADD") = txtAdd.Text
    RS("CN") = txtCN.Text
    Photo1.SavePhoto RS.Fields("Picture")
RS.Update
MsgBox "RecordSaved!"
Locker


cmdOperations(2).Enabled = False
cmdRefresh.Enabled = False
cmdPicInsert.Enabled = False
cmdPicShow.Enabled = False
cmdPicSave.Enabled = False

End Sub

Private Sub cmdPicInsert_Click()
Photo1.OpenPhotoFile
End Sub

Private Sub cmdPicSave_Click()
On Error GoTo hell
    cmdlg.ShowSave
    If cmdlg.Filename <> "" Then
        SavePicture Photo1.Picture, cmdlg.Filename
    End If
hell:
End Sub

Private Sub cmdPicShow_Click()
On Error Resume Next
        Kill "tmp.jpg"
        SavePicture Photo1.Picture, "tmp.jpg"
        ShellEx "tmp.jpg"
End Sub

Private Sub cmdRefresh_Click()
Locker
RS.Cancel
cmdOperations(2).Enabled = False
cmdRefresh.Enabled = False
cmdPicInsert.Enabled = False
cmdPicShow.Enabled = False
cmdPicSave.Enabled = False
End Sub

Private Sub Command1_Click()
Dim RS As New ADODB.Recordset

    With RS
        .Open "SELECT [Picture] FROM tblViray WHERE LN='" & txtLN.Text & "'", cn, adOpenForwardOnly, adLockOptimistic
        If Len(RS!Picture) > 0 Then
            Photo1.LoadPhoto RS!Picture
        Else
            Set Photo1.Picture = LoadPicture()
        End If
        .Close
    End With
    Set tmpRS = Nothing
End Sub

Private Sub Form_Load()
Locker

cmdOperations(2).Enabled = False
cmdRefresh.Enabled = False
cmdPicInsert.Enabled = False
cmdPicShow.Enabled = False
cmdPicSave.Enabled = False

AnimateForm Me, aLoad, aMedium


Timer1.Enabled = True
Set cn = New ADODB.Connection
Set RS = New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Viray.mdb;"
With RS
        .ActiveConnection = cn
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Source = "select * from tblViray"
        .Open
End With

With RS
            If .RecordCount < 1 Then
                txtcount.Text = 0
            Else
                txtcount.Text = .AbsolutePosition
            End If
            lblmax.Caption = .RecordCount
        End With
       
       
        With RS
         txtSN.Text = .Fields("SN")
                txtLN.Text = .Fields("LN")
                txtFN.Text = .Fields("FN")
                txtMI.Text = .Fields("MI")
                cmbCourse.Text = .Fields("COURSE")
                cmbYear.Text = .Fields("YEARLEV")
                txtAdd.Text = .Fields("ADD")
                txtCN.Text = .Fields("CN")
                DTDOB.Value = .Fields("DOB")
            End With
           

End Sub


Function checker() As Boolean
Dim X
For Each X In Me
    If TypeOf X Is TextBox Then
        If X.Text = "" Then
            MsgBox ("insuficient data!")
            X.SetFocus
            checker = False
            Exit Function
        End If
    ElseIf TypeOf X Is ComboBox Then
        If X.Text = "" Then
            MsgBox ("insuficient data!")
            X.SetFocus
            checker = False
            Exit Function
        End If
    End If
Next
checker = True
End Function

Private Sub DisplayRecords()

'Display the current and total number of record

Dim i As Integer

    On Error Resume Next
        With RS
            If .RecordCount < 1 Then
                txtcount.Text = 0
            Else
                txtcount.Text = .AbsolutePosition
            End If
            lblmax.Caption = .RecordCount

            For i = 0 To 6
                txtSN.Text = .Fields("SN")
                txtLN.Text = .Fields("LN")
                txtFN.Text = .Fields("FN")
                txtMI.Text = .Fields("MI")
                cmbCourse.Text = .Fields("COURSE")
                cmbYear.Text = .Fields("YEARLEV")
                txtAdd.Text = .Fields("ADD")
                txtCN.Text = .Fields("CN")
                DTDOB.Value = .Fields("DOB")
            Next i
        End With
      
End Sub
Private Sub Locker()
txtSN.Locked = True
txtLN.Locked = True
txtFN.Locked = True
txtMI.Locked = True
cmbCourse.Locked = True
cmbYear.Locked = True
txtAdd.Locked = True
txtCN.Locked = True
End Sub

Private Sub Unlocker()
txtSN.Locked = False
txtLN.Locked = False
txtFN.Locked = False
txtMI.Locked = False
cmbCourse.Locked = False
cmbYear.Locked = False
txtAdd.Locked = False
txtCN.Locked = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
AnimateForm Me, aUnload, aMedium
End Sub

Private Sub Timer1_Timer()
cmbCourse.AddItem ("BSIT")
cmbCourse.AddItem ("BSHRM")
cmbCourse.AddItem ("BSEd")
cmbCourse.AddItem ("HRS")
cmbCourse.AddItem ("ICT")
cmbCourse.AddItem ("Caregivimg")

cmbYear.AddItem ("1st")
cmbYear.AddItem ("2nd")
cmbYear.AddItem ("3rd")
cmbYear.AddItem ("4th")

Timer1.Enabled = False
End Sub

Private Sub txtAdd_Change()
SendKeys "{end}"
txtAdd.Text = StrConv(txtAdd.Text, vbProperCase)

End Sub

Private Sub txtCN_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
    Case 48 To 57
    Case 13
    Case 8
    Case Else
        KeyAscii = 0
End Select
End Sub

Private Sub txtFN_Change()
SendKeys "{end}"
txtFN.Text = StrConv(txtFN.Text, vbProperCase)

End Sub

Private Sub txtFN_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
    Case 97 To 122
    Case 65 To 90
    Case 32
    Case 8
    Case Else
        KeyAscii = 0
End Select
End Sub

Private Sub txtLN_Change()
SendKeys "{end}"
txtLN.Text = StrConv(txtLN.Text, vbProperCase)

End Sub

Private Sub txtLN_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
    Case 97 To 122
    Case 65 To 90
    Case 32
    Case 8
    Case Else
        KeyAscii = 0
End Select
End Sub


Private Sub txtMI_Change()
SendKeys "{end}"
txtMI.Text = StrConv(txtMI.Text, vbProperCase)

End Sub

Private Sub txtMI_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
    Case 97 To 122
    Case 65 To 90
    Case 32
    Case 8
    Case Else
        KeyAscii = 0
End Select
End Sub



Private Sub txtSN_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
    Case 48 To 57
    Case 13
    Case 8
    Case Else
        KeyAscii = 0
End Select
End Sub
Private Sub Timer2_Timer()
If TypeOf Me.ActiveControl Is TextBox Then
    Set ctrl = Me.ActiveControl
   Me.ActiveControl.BackColor = &H80C0FF
ElseIf TypeOf Me.ActiveControl Is ComboBox Then
    Set ctr = Me.ActiveControl
   Me.ActiveControl.BackColor = &H80C0FF
End If
End Sub
Private Sub ctrl_LostFocus()
    ctrl.BackColor = vbWhite
End Sub
Private Sub ctr_LostFocus()
    ctr.BackColor = vbWhite
End Sub

Project Homepage: