Home » Attendance Management System Using MS Access and VB 6 Part 5

Attendance Management System Using MS Access and VB 6 Part 5

Attendance Management System Using MS Access and VB 6 Part 5 – This is the final part of the attendance management project. You will learn about MDI form and creating a module for database connection in this part.

Now that we have created all our form successfully by following previous articles of this project, you must assemble them in one place. The MDI form is a special kind of form in Visual Basic 6 which display only one form at a time. Also, there is an option to create a custom menu for your project.

Creating MDI From For Attendance Management

The first step is to create an MDI Form from Project Explorer. Note that you cannot create more than one MDI Form.

Create an MDI Form
Create an MDI Form

Right-click FormName and click Add, and select MDI Form. A new form will appear similar to one shown below. In your case, the form will not have menus. In this section we will learn to create menus for Attendance Management system, moreover, each of the menus is visible to specific users, and not others depending on their privilege.

MDI Form for Attendance Management
MDI Form for Attendance Management

ViewAttendance Menu

The view attendance menu is for students. To create the menu, click the Menu Editor on the standard toolbar. Enter following details for view attendance menu.

viewattendance menu
view attendance menu

Code For ViewAttendance

Enter following code for view attendance menu.


Private Sub exit_Click(Index As Integer)
Unload Me

End Sub

Private Sub menuViewAtten_Click(Index As Integer)
frmViewAttendence.Show
frmTodayAttendence.Hide

menuStuRec.Item(3).Enabled = False
menuTeachRec.Item(4).Enabled = False
menuToday.Item(2).Enabled = False

End Sub

Today Attendance Menu

The today attendance menu is only for admins and teacher to mark current attendance. Create another menu with following details.

Todayattendance menu
Today attendance menu

Code for Today Attendance

Add the following code to today attendance code editor.

Private Sub menuToday_Click(Index As Integer)
frmViewAttendence.Hide
frmTodayAttendence.Show

menuStuRec.Item(3).Enabled = False
menuTeachRec.Item(4).Enabled = False
menuToday.Item(2).Enabled = True
menuViewAtten.Item(0).Enabled = True

End Sub

Student Record Management Menu

The next menu – student record management is used only by admins to update, add, or delete student records. Create another menu for student record management.

studentrecordmanagement
student record management

Code For Student Record Management

Private Sub menuStuRec_Click(Index As Integer)
frmStudent.Show
menuStuRec.Item(3).Enabled = True
menuTeachRec.Item(4).Enabled = True
menuToday.Item(2).Enabled = True
menuViewAtten.Item(0).Enabled = True
End Sub

Teacher Record Management Menu

The teacher record management is the responsibility of admin, therefore, only they can view this menu. Now, create a new menu from menu editor using following details.

Teacher Record Management menu
Teacher Record Management menu

Code For Teacher Record Management

Private Sub menuTeachRec_Click(Index As Integer)
frmTeacherRecord.Show
menuStuRec.Item(3).Enabled = True
menuTeachRec.Item(4).Enabled = True
menuToday.Item(2).Enabled = True
menuViewAtten.Item(0).Enabled = True
End Sub

Menu Exit

This menu item exit the MDI form. Create a new menu item using the following detail.

Menu Exit
Menu Exit

Code For Menu Exit

Private Sub exit_Click(Index As Integer)
Unload Me
End Sub
(adsbygoogle = window.adsbygoogle || []).push({}); </script

Please support us by disabling your adblocker or whitelist this site from your adblocker. Thanks!

turn of adblocker imag

(adsbygoogle = window.adsbygoogle || []).push({});