//Display the modify entry form
        private void modifyPictureBox_Click(object sender, EventArgs e)
        {
            //Create a new instance of the modify form
            ModifyForm modifyForm = new ModifyForm();

            //Get student number
            GetStudentNumber();

            //Only continute if a student name is selected
            if (studentListBox.SelectedIndex > -1)
            {
                //Pass on attendance values to the modify form
                ModifyForm.value1Integer = period1Integer;
                ModifyForm.value2Integer = period2Integer;
                ModifyForm.value3Integer = period3Integer;
                ModifyForm.value4Integer = period4Integer;
                ModifyForm.absentInteger = absentTotalInteger;
                ModifyForm.lateInteger = late1TotalInteger;

                //Show the modify form
                modifyForm.ShowDialog();

                //Update values
                updateValues();

                //Update period status label
                if (sectionInteger == 1)
                {
                    classAttendance();
                }

            }
        }
        //Modify a entry for a student
        private void modify2PictureBox_Click(object sender, EventArgs e)
        {
            //Declare variables
            string valString;
            int selectedIndexInteger = 0;

            //Create a new instance of the modify form
            ModifyForm modifyForm = new ModifyForm();

            //Get student number
            GetStudentNumber();

            //Get attendance values
            valString = adminDataSet.Tables[1].Rows[storageInteger][dateString].ToString();

            //Get attendance values for each period
            GetAttendanceValues(valString);

            //Only continute if a student name is selected
            if (student2ListBox.SelectedIndex > -1)
            {

                //Get the selected index integer
                if (sectionInteger == 2)
                {
                    selectedIndexInteger = studentListBox.SelectedIndex;
                }

                //Pass on attendance values to the modify form
                ModifyForm.value1Integer = period1Integer;
                ModifyForm.value2Integer = period2Integer;
                ModifyForm.value3Integer = period3Integer;
                ModifyForm.value4Integer = period4Integer;
                ModifyForm.absentInteger = absentTotalInteger;
                ModifyForm.lateInteger = late1TotalInteger;

                //Show the modify form
                modifyForm.ShowDialog();

                //Update values
                updateValues();

                //Update period status label
                if (sectionInteger == 1)
                {
                    classAttendance();
                }
                else if (sectionInteger == 2)
                {
                    studentListBox.SelectedIndex = selectedIndexInteger;
                    GetPeriodData();
                }

            }
        }