You are on page 1of 102

Mock Online Assessment

SL No

Title

Page. No

Acknowledgement

Introduction

Aim of the Project

Synopsis

Software and Hardware Requirements

Software Description

System Design and development

12

Database Structure

15

Source Code

16

10

Screen Shots

81

11

Testing

96

12

Conclusion

97

13

Bibliography

100

INDEX

1 of 101

Mock Online Assessment

2 of 101

Mock Online Assessment

LIST OF FIGURES
FIGURE 1: Starting form of the project..

82

FIGURE 2: Loading form of the project .

83

FIGURE 3: Selecting the user form..

84

FIGURE 4: Student login form for entering online exam..

85

FIGURE 5: Examination details 86


FIGURE 6: form to review exam details..

87

FIGURE 7: MDI Form...

88

FIGURE 8: Login form for administrator and staff...

88

FIGURE 9: Question paper form..

89

FIGURE 10: Report of the student result. 90


FIGURE 11: Form to view the student result..

91

FIGURE 12: data report of the student result.

92

FIGURE 13: Student registration form

93

FIGURE 14: Student details form.

95

3 of 101

Mock Online Assessment

ACKNOWLEGDEMENT
The project Mock Online Assessment was undertaken as a part of the
syllabus of sixth Semester ________________________ of ____________________
University. The purpose of this project is to provide the student with reliable and
comfortable software through which they can for online exam and provide quick
result.
Firstly we would like to thank our principal and the management for
certifying this project and giving the opportunity to implement this project in college.
We would like to express our deepest and heart full thanks to our project cocoordinator __________________ for this excellent guidance and valuable effort
throughout the development of the project.
Our special thanks goes to Head of the Computer Dept. for providing us with
all facilities we required in the successful completion of the project.
Finally we would like to thanks our friends and other faculty members of the
computer Dept. who also supported us throughout the development of the project.

4 of 101

Mock Online Assessment

INTRODUCTION
The project Mock Online Assessment provides the easiest way of handling
Mock Online Assessment. This project is divided into different module means
selecting the user. There are 3 login areas for different users:
1. Administration: he has the access to the database and every report generated by the
institute. His part of job is to register and take admission of candidates like staff and
students. He can modify, delete, insert, and register. He is the super user who is
maintaining every detail each individual.
2. Staff: - staff has the permission to set questions for online exam. They are
generating report for the appeared candidates in exam. Each staff is providing with
different staffed, name and password. They can login through their own id and
password.
3. Student: - the last login area is for students. First they have to take admission in
the institute and register for online exam. Each student will provide with different
student id, name and password. Using their own id & password, they can appear for
online exam.

5 of 101

Mock Online Assessment

AIM OF THE PROJECT:


Aim of this project is to develop software that will provide easiest and reliable
way for appearing Mock Online Assessment with suitable patterns of requirements
and can be used to generate instant result.

6 of 101

Mock Online Assessment

SYNOPSIS

The purpose of Mock Online Assessment is to provide the student with


reliable and comfortable software through which they can go for online exam and
provide instant result. Here we maintains different user login:
1. Student: who is appearing for online Exam.
2. Staff: who is responsible for providing questions to the candidate and exam
evaluation
3. Administrator: who is responsible for taking admissions and registering for online
exam, Moreover, he maintains the database record
We have developed an Admin area where the administrator of the Mock
Online Assessment can perform the following operations.

Take admissions of student

Register students for Mock Online Assessment

Maintains information of staff

Provides different permissions to student and staff

Modify the records of the database

The database holds the following details of Mock Online Assessment

module

question bank

result

staff

student
7 of 101

Mock Online Assessment

Software and Hardware Requirements

Software Requirements:

Microsoft Windows XP/Vista or Windows 7

Visual basic 6.0

Microsoft Access 2003

Hardware Requirements:

Intel Pentium 4

512 MB DDR2 Ram

Min 2 GB HDD free space

8 of 101

Mock Online Assessment

SOFTWARE DESCRIPTION
Front End:
Visual basic 6.0
Although VB.NET is gaining ground fast, VB 6 remains the most popular
programming environment in the entire history of the world! But even if it wasn't as
great as it is, it's still the best place to start learning about programming! One reason
is that the original BASIC ("Beginner's All purpose Symbolic Instruction Code") was
designed as a language to teach people how to program by Kemeny and Kurtz at
Dartmouth College w-a-a-a-y back in 1963. A lot of very talented programmers think
that VB 6 is still the best development environment.. Or perhaps you're reluctant to
pay the new, enhanced prices that Microsoft is asking for .NET software. Whatever
your reasons, it's clear that VB 6 is going to be around for a good while longer. You
can invest in learning how to be an expert programmer using VB 6 and be confident
that you're not wasting your time!]

Learning VB 6
In the 'Essentials' topic Learning Visual Basic, a program that uses one form with two
command buttons was introduced.

We're going to go through the complete steps to create this. First ... in rapid fire ... the
steps. Then ... a more complete explanation.
1. Start Visual Basic. Usually, 'Start > Programs > Microsoft Visual Studio >
Microsoft Visual Basic 6.0'. You should see a window similar to this:
9 of 101

Mock Online Assessment

2. Click the default "Standard EXE" icon and then click the "Open" button.
3. Drag a 'Command Button' from the 'Toolbox' to the form and drop it. Drag
another one to the form and drop it.
4. Click the first 'Command Button' to select it. Open the property window and
change the 'Name' property to 'CommandA'.
5. Select the second 'Command Button' from the drop down window at the top of
the property window and then change the 'Name' property to 'CommandB'.
6. Double click the first 'Command Button' object in the form to open the code
window for that button.
7. Enter the code, Msgbox "You clicked Button A" after the automatically
entered code Private Sub CommandA_Click()
8. Double click the second 'Command Button' object in the form to open the
code window for that button.
9. Enter the code, Msgbox "You clicked Button B" after the automatically
entered code Private Sub CommandA_Click()

10 of 101

Mock Online Assessment

10. Click the 'Run' button in the toolbar at the top of the VB 6 development
environment window to execute the program.
11. Click either button A or button B and observe the fruits of your labor!

Visual Basic Overview


Welcome to our big book on Visual Basic. Its no secret that Visual Basic is
the favorite programming environment of many programmers. (In fact, youre
reading a book written by one of those programmers right now.) When Visual Basic
first appeared, it created a revolution in Windows programming, and that revolution
continues to this day. Never before had Windows programming been so easyjust
build the program you want, right before your eyes, and then run it. Visual Basic
introduced unheard-of ease to Windows programming and changed programming
from a chore to something very fun. In time, Visual Basic has gotten more complex,
as well as more powerful. In this book, were going to see how to use Visual Basic in
a task-oriented way, which is the best way to write about programming. Instead of
superimposing some abstract structure on the material in this book, well organize it
the way programmers want ittask by task.

Creating a Project in Visual Basic


There are three different editions of Visual Basic:
The Learning Edition, which is the most basic edition. This edition allows you to
write many different types of programs, but lacks a number of tools that the other
editions have.
The Professional Edition, designed for professionals. This edition contains all that
the Learning Edition contains and more, such as the capability to write ActiveX
controls and documents

11 of 101

Mock Online Assessment

The Enterprise Edition, which is the most complete Visual Basic edition. This
edition is targeted towards professional programmers who may work in a team and
includes additional tools such as Visual SourceSafe, a version-control system that
coordinates team programming.
Well use the Enterprise Edition in this book, so if you have either of the other two
editions, we might occasionally use something not supported in your Visual Basic
edition.

Back End:
Microsoft Access 2003:
Microsoft Access database is collection of data related to a particular
subject or purpose. Within a database, information about a particular entity,
such as an employee or order, is categorized into tables, records, and fields.
A database is a collection of information that's related to a particular subject
or purpose, such as tracking customer orders or maintaining a music collection. If
your database isn't stored on a computer, or only parts of it are, you may be tracking
information from a variety of sources that you have to coordinate and organize
yourself.
For example, suppose the phone numbers of your suppliers are stored in
various locations: in a card file containing supplier phone numbers, in product
information files in a file cabinet, and in a spreadsheet containing order information.
If a supplier's phone number changes, you might have to update that information in
all three places. In a database, however, you only have to update that information in
one place the supplier's phone number is automatically updated wherever you use it
in the database

12 of 101

Mock Online Assessment

System Design and


Development

13 of 101

Mock Online Assessment

DATA FLOW DIAGRAM:


A Data Flow Diagram models a system by using external entries from which
data flows to a process which transforms the data and creates output data which goes
to other processes on external entities of file. Data in files may also flow to processes
as inputs.
The main merit of data flow diagram is that it can provide an overview of
what data a system processes, what transformation of data are done, what files are
used and where the results flow. The graphical representation of the system makes it a
good communication tool between the user and the analyst.
It is difficult to understand the business through verbal description alone. Here Data
Flow Diagrams help in illustrating the essential component of a process and the way
they interact.
The symbols appearing in the Data Flow Diagram have been explained below.

Process

Entity
Database

Dataflow

14 of 101

Mock Online Assessment

A circle is used to represent a process. Both input and output are data flows. A
line with an arrow represents a data flows. The arrow shows the direction of flow
data. External entities are represented by rectangles. Entities supplying data are
known as source and those that consume data are called sinks.

Admissio
n

Registe
r

Administrator

Exam

Student

Result

Evaluatio
n

Staff

Online
examination

Administrator

student, staff

Student

module

Staff

result

15 of 101

Mock Online Assessment

Database Design

16 of 101

Mock Online Assessment

TABLES USED
Table No: 1
Table Name:
Description:

Module

Describes the types of subject to be included for Mock Online

Assessment
Serial No:

Field Name

Data Type

Description

Mcode

Text

Module code

Msub

Text

Module subject name

Mno

Number

Module number

Table No: 2
Table Name: Question bank
Description:

Describes about the question containing in different modules

Serial No:

Field Name

Data Type

Description

Mcode

Text

Module code

Qno

Number

Question number

Qnm

Memo

Main question

Opt1

Memo

Option1

Opt2

Memo

Option2

Opt3

Memo

Option3

Opt4

Memo

Option4

Qans

Memo

Question answer

Qmarks

Number

Question marks

Table No: 3
17 of 101

Mock Online Assessment

Table Name:
Description:

Result

describes about the result of the candidates appeared for online exam

Serial No:

Field Name

Data Type

Description

Resno

Auto Number

Result no.

Stcode

Text

Student code

Stname

Text

Student name

Date

Date/Time

Date of examination

Mcode

Text

Module code

Noqatmp

Number

No. of questions attempted

Noq

Number

Number of questions

Timetaken

Text

Time taken

Markobt

Number

Marks obtained

10

Marks

Number

Total marks

11

Grade

Text

grade

Table No: 4
Table Name:
Description:
Serial No:
1
2
3
4
5
6
7
8

Student

describe about the student details


Field Name
Stcode
Stpsw
Stname
Phone
Sex
Dob
Email
Address

Data Type
Text
Text
Text
Number
Text
Date/time
Text
Text

Description
student code
student password
student name
registation number
gender
date of birth
email address
student address

18 of 101

Mock Online Assessment

9
10

Qualification
Date

Text
Date/time

student qualification
date of examination
registration

Table No: 5
Table Name:
Description:
Serial No:
1
2
3
4
5
6
7
8
9
10

Staff

describes about the staff details


Field Name
Staffcode
Staffname
Staffpsw
Qualification
Sex
Phone
Email
Address
Dob
Date

Data Type
Text
Text
Text
Text
Text
Number
Text
Text
Date/time
Date/time

Description
staff code
staff member name
staff member password
staff qualification
staff gender
phone number
email address
staff communication address
date of birth
Date

19 of 101

Mock Online Assessment

Source Code

20 of 101

Mock Online Assessment

SUBJECT INFORMATION FORM


Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim nm As String
Dim id As String
Dim pass As String
Dim info As String
Private Sub cmddel_Click()
rs.Delete
rs.MoveNext
If rs.EOF Then rs.MoveLast
display
End Sub
Private Sub cmdexit_Click()
MDIForm1.Show
End Sub
Private Sub cmdfirst_Click()
rs.MoveFirst
display
End Sub
Private Sub cmdlast_Click()
rs.MoveLast
display
End Sub
Private Sub cmdmodi_Click()
id = InputBox("ENTER THE STAFF CODE ", "MODIFICATION")
rs.MoveFirst
Do While Not rs.EOF
21 of 101

Mock Online Assessment

If rs.Fields(0) = id Then
If rs.EditMode = adEditNone Then
txtuid.Text = rs.Fields(0)
txtunm.Text = rs.Fields(1)
txtupw.Text = rs.Fields(2)
txtinf.Text = rs.Fields(3)
End If
Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.SetFocus
End Sub
Private Sub cmdnext_Click()
rs.MoveNext
If rs.EOF Then
rs.MoveLast
End If
display
End Sub
Private Sub cmdpre_Click()
rs.MovePrevious
If rs.BOF Then
rs.MoveFirst
End If
display
End Sub
Private Sub cmdsave_Click()
rs.Close

22 of 101

Mock Online Assessment

rs.Open "module", CN, adOpenDynamic, adLockOptimistic


rs.AddNew
rs!mcode = txtmcode.Text
rs!msub = txtmname.Text
rs!mno = txtmno.Text
rs.Update
End Sub
Private Sub Command1_Click()
txtmcode.Text = ""
txtmname.Text = ""
txtmno.Text = ""
txtmcode.SetFocus
End Sub
Private Sub Command2_Click()
'rs!mcode = txtmcode.Text
rs!msub = txtmname.Text
rs!mno = txtmno.Text
End Sub
Private Sub Form_Activate()
Set rs = New ADODB.Recordset
rs.Open "module", CN, adOpenDynamic, adLockOptimistic
display
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
End Sub
Public Sub display()
txtmcode.Text = rs!mcode

23 of 101

Mock Online Assessment

txtmname.Text = rs!msub
txtmno.Text = rs!mno
End Sub
QUESTION PAPER FORM
'Private Sub Form_Load()
' Text1.Text = Mid$(str(Time), 3, 2)
'end Sub
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim nm As String
Dim id As String
Dim pass As String
Dim info As String
Private Sub cmddel_Click()
rs.Delete
rs.MoveNext
If rs.EOF Then rs.MoveLast
display
End Sub
Private Sub cmdexit_Click()
MDIForm1.Show
End Sub
Private Sub cmdfirst_Click()
rs.MoveFirst
display
End Sub

24 of 101

Mock Online Assessment

Private Sub cmdlast_Click()


rs.MoveLast
display
End Sub
Private Sub cmdmodi_Click()
id = InputBox("ENTER THE STAFF CODE", "modification")
rs.MoveFirst
Do While Not rs.EOF
If rs.Fields(0) = id Then
If rs.EditMode = adEditNone Then
txtmcode.Text = rs!mcode
txtqnm.Text = rs!qnm
txtqno.Text = rs!qno
txtopt1.Text = rsopt1
txtopt2.Text = rsopt2
txtopt3.Text = rs!opt3
txtopt4.Text = rs!opt4
txtqans.Text = rs!qans
txtqmarks.Text = rs!qmarks
End If
Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.SetFocus
End Sub
Private Sub cmdnext_Click()
rs.MoveNext

25 of 101

Mock Online Assessment

If rs.EOF Then rs.MoveLast


display
End Sub
Private Sub cmdpre_Click()
rs.MovePrevious
If rs.BOF Then rs.MoveFirst
display
End Sub
Private Sub cmdsave_Click()
rs.Close
rs.Open "qbank", CN, adOpenDynamic, adLockOptimistic
rs.AddNew
rs!mcode = txtmcode.Text
rs!qno = txtqno.Text
rs!qnm = txtqnm.Text
rs!opt1 = txtopt1.Text
rs!opt2 = txtopt2.Text
rs!opt3 = txtopt3.Text
rs!opt4 = txtopt4.Text
rs!qans = txtqans.Text
rs!qmarks = txtqmarks.Text
rs.Update
MsgBox ("record saved")
End Sub
Private Sub Command1_Click()
txtmcode.Text = ""
txtqnm.Text = ""
txtqno.Text = ""
txtopt1.Text = ""
txtopt2.Text = ""

26 of 101

Mock Online Assessment

txtopt3.Text = ""
txtopt4.Text = ""
txtqans.Text = ""
txtqmarks.Text = ""
txtmcode.SetFocus
End Sub
Private Sub Form_Activate()
Set rs = New ADODB.Recordset
rs.Open "qbank", CN, adOpenDynamic, adLockOptimistic
display
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/LOURDU/exam.mdb"
End Sub
Public Sub display()
txtmcode.Text = rs!mcode
txtqnm.Text = rs!qnm
txtqno.Text = rs!qno
txtopt1.Text = rs!opt1
txtopt2.Text = rs!opt2
txtopt3.Text = rs!opt3
txtopt4.Text = rs!opt4
txtqans.Text = rs!qans
txtqmarks.Text = rs!qmarks
End Sub
Private Sub Label10_Click()
End Sub

27 of 101

Mock Online Assessment

STUDENT FORM DETAILS


Dim CN As New Connection
Dim RS1 As New Recordset
Dim STR As String

Private Sub Command1_Click()


CN.CursorLocation = adUseClient
Set RS1 = New ADODB.Recordset
CN.Open

"PROVIDER=MICROSOFT.JET.OLEDB.3.51;DATA

SOURCE=D:\LOURDU\exam.mdb;"
STR = "select * from result where stcode ='" & Text1.Text & "'" & " And 'date' ='" &
Text2.Text & "'" & " And modcode = '" & Text3.Text & " '"
RS1.Open STR, CN, adOpenDynamic, adLockOptimistic
If RS1.EOF = True Then
'If IsDate(Text2) = True Then
DataEnvironment1.Command2 Text1, Text2, Text3
DataReport1.Show
'End If
Else
MsgBox "THIS INFORMATION IS NOT THERE, PLEASE ENTER CORRECT
INFORMATI0N"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End If
'CN.Close
'DataReport6.Refresh
'DataEnvironment1.rsCommand2.Close

28 of 101

Mock Online Assessment

End Sub
Private Sub Command2_Click()
'Form5.Hide
'MDIForm1.Show
Unload Me
End Sub

EXAMINATION DETAILS

Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim STR As String
Private Sub cmbmod_Click()
If cmbmod.Text = "" Then
MsgBox " select module name "
cmbmod.SetFocus
End If
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
txt1.Text = cmbmod.Text
STR = "select * from module where msub ='" & txt1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " select nodule name correctly"
End If
txtmodno.Text = rs!mcode
MAIN.modcode = rs!mcode

29 of 101

Mock Online Assessment

'NOQ.SetFocus
End Sub
Private Sub cmbmod_GotFocus()
StatusBar1.Panels(3).Text = "SELECT SUBJECT WHICHONE U WANT "
End Sub
Private Sub cmbmod_LostFocus()
If cmbmod.Text = "" Then
MsgBox " SELECT SUBJECT NAME "
cmbmod.SetFocus
End If
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
txt1.Text = cmbmod.Text
STR = "select * from module where msub ='" & txt1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " select nodule name correctly"
End If
txtmodno.Text = rs!mcode
MAIN.modcode = rs!mcode
End Sub
Private Sub cmdcon_Click()
INSTRUCTION.Show
End Sub

Private Sub Form_Activate()

30 of 101

Mock Online Assessment

Text1.Text = "10"
MAIN.NOQ = Text1.Text
Text2.Text = "1"
MAIN.RT = Text2.Text
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
rs.Open "module", CN, adOpenDynamic, adLockOptimistic
While rs.EOF <> True
cmbmod.AddItem rs!msub
rs.MoveNext
Wend
rs.Close
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(2, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
'mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "SELECT WHICH SUBJECT U WANT TO ATTEMPT"
StatusBar1.Panels(3).AutoSize = sbrSpring
End Sub

31 of 101

Mock Online Assessment

'Private Sub noq_Click()


'main.noq = noq.Text
'Print main.noq
'End Sub
'Private Sub rqt_Click()
'main.RT = rqt.Text
' Print main.RT
'End Sub
'Private Sub rqt_GotFocus()
'If main.NOQ = 0 Then
' NOQ.SetFocus
' End If
'End Sub

MOCK ONLINE ASSESSMENT MAIN FORM

Private Sub MDIForm_Load()


End Sub
Private Sub MN_DWR_Click()
DAWIRES.Show
End Sub

32 of 101

Mock Online Assessment

Private Sub MN_JEBA_Click()


Form2.Show
End Sub
'Private Sub MN_EXAM_Click()
' INSTRUCTION.Show
'Form1.Show
'End Sub
'Private Sub MNU_DAILY_Click()
'userreport.Show
'End Sub

Private Sub MN_RR_Click()


RESREPORT.Show
End Sub
Private Sub MN_SR_Click()
SUBJECT.Show
End Sub
Private Sub MN_STR_Click()
STAFFREPORT.Show
End Sub
Private Sub MN_STUR_Click()
STUDENTREPORT.Show
End Sub

33 of 101

Mock Online Assessment

Private Sub MNU_EXIT_Click()


End
End Sub
Private Sub MNU_MOD_Click(Index As Integer)
ADM_MOD.Show
End Sub
Private Sub MNU_QPAPER_Click(Index As Integer)
ADMIN_QPAPER.Show
End Sub
'Private Sub MNU_TOT_Click()
'resultreport.Show
'End Sub
'Private Sub MOD_REP_Click(Index As Integer)
'MODULEREPORT.Show
'End Sub
Private Sub MNU_STAFF_Click(Index As Integer)
STAFFADM.Show
End Sub
Private Sub MNU_STUDENT_Click(Index As Integer)
STUADM.Show
End Sub
LOGIN FORM OF STAFF AND ADMINISTRATOR
Private Sub Command1_Click()
If Text1.Text = "GIRISH" Then

34 of 101

Mock Online Assessment

STAFFLOGIN.Show
Unload password
Else
MsgBox ("INVALID PASSWORD DEAR...")
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
If Text1.Text = "REDDY" Then
MDIForm1.Show
Else
MsgBox ("INVALID PASSWORD DEAR...")
Text1.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub

STUDENT RESULT FORM


Dim CN As New Connection
Dim RS1 As New Recordset

35 of 101

Mock Online Assessment

Private Sub Command1_Click()


CN.CursorLocation = adUseClient
'Set CN = New ADODB.Connection
'CN.Provider = "microsoft.jet.oledb.4.0"
'CN.Open "D:/lourdu/loexam.mdb"
'Set RS1 = New ADODB.Recordset
CN.Open

"PROVIDER=MICROSOFT.JET.OLEDB.3.51;DATA

SOURCE=D:\LOURDU\exam.mdb;"
RS1.Open "select * from result where resno =" + Text1.Text, CN, adOpenDynamic,
adLockOptimistic
If RS1.EOF <> True Then
If IsNumeric(Text1) = True Then
DataEnvironment1.Command1 Text1
PRERES.Show
End If
Else
MsgBox "THIS NUMBER IS NOT THERE ,PLEASE ENTER CORRECT
NUMBER"
Text1.SetFocus
Text1.Text = ""
End If
CN.Close
PRERES.Refresh
DataEnvironment1.rsCommand1.Close
End Sub
Private Sub Command2_Click()
'Form5.Hide
'MDIForm1.Show
'Unload Me
STULOGIN.Show

36 of 101

Mock Online Assessment

End Sub
QUESTION PAPER FORM
Dim mark As Integer
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim RS1 As ADODB.Recordset
Dim no(50) As Integer
Dim unm, grade As String
Dim i, k, qsta As Integer
Dim modcode As String
Dim hor1, sec1, second, min1, q As Integer
Dim s2, m2, h2 As Integer
Dim res, qno1 As Integer
Dim STR, ans, qsans As String
Dim tm As Timer
Dim mar As Integer
Private Sub cmdexit_Click()
ans = MsgBox("ARE U SURE TO EXIT", vbYesNo)
If ans = vbYes Then
End
End If
End Sub
Private Sub cmdnext_Click()
qsta = qsta + 1
MAIN.qsta = qsta
mark = mark + rs!qmarks
MAIN.ma = mark
MAIN.lo = mark

37 of 101

Mock Online Assessment

Text1.Text = mark
If opta.Value = False And optb.Value = False And optc.Value = False And optd.Value
= False Then
MsgBox " select any answer and then click next"
Exit Sub
End If
Call checkans
If i = MAIN.NOQ Then
cmdres.SetFocus
cmdnext.Enabled = False
ans = Empty
End If
Call navi
'If i = 11 Then cmdnext.Enabled = False
End Sub
Private Sub cmdnext_GotFocus()
If opta.Value = False And optb.Value = False And optc.Value = False And optd.Value
= False Then
MsgBox " SELECT ANY ANSWER AND THEN CLICK NEXT"
End If
End Sub
Private Sub cmdres_Click()
Dim nanme As String
marks.Text = mark
'ch.Text = chk
RS1.AddNew
'unm = main.username
q = MAIN.NOQ
RS1!stname = MAIN.stname
RS1!stcode = MAIN.stcode

38 of 101

Mock Online Assessment

RS1!marks = Val(marks.Text)
RS1!timetaken = h6.Caption + ":" + m6.Caption + ":" + s6.Caption
RS1!Date = CDate(txtdate.Text)
RS1!modcode = txtmod.Text
'rs1!sec = second
RS1!NOQ = q
RS1!noqatmp = MAIN.qsta
RS1.Update
RS1.Requery
RESULT.Show
End Sub

Private Sub Form_Activate()


'Tmr1.Enabled = True
i=1
k=0
End Sub
Private Sub Form_Initialize()
second = 0
i=0
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
Set rs = New ADODB.Recordset
Set RS1 = New ADODB.Recordset
'Set rs2 = New ADODB.Recordset
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
txtuid.Text = MAIN.stcode

39 of 101

Mock Online Assessment

txtmod.Text = MAIN.modcode
txtdate.Text = Date
no(0) = Int(Rnd * 25) + 1
STR = " select * from qbank where mcode ='" & Trim(txtmod.Text) & "'and qno=" &
no(0)
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
RS1.Open "result", CN, adOpenDynamic, adLockOptimistic
txtqno.Text = rs!qno
lblqnm.Caption = rs!qnm
lbla.Caption = rs!opt1
lblb.Caption = rs!opt2
lblc.Caption = rs!opt3
lbld.Caption = rs!opt4
qsnas = rs!qans
qno1 = 1
s2 = 60
m2 = MAIN.RT
QUESTIONPAPER.Show
TOTQ.Caption = MAIN.NOQ
qno2.Caption = qno1
Call checkans
End Sub

Public Sub navi()


Dim j As Integer
If i = MAIN.NOQ Then Exit Sub
qno1 = qno1 + 1
qno2.Caption = qno1
k=k+1
lb:

40 of 101

Mock Online Assessment

rn = Int(Rnd * 25) + 1
For m = 0 To k
If no(m) = rn Then
GoTo lb
End If
Next m
no(0 + k) = rn
rs.Close
STR = " select * from qbank where mcode ='" & Trim(txtmod.Text) & "'and
qno=" & rn
'" slect * from qbank where mcode = '" & Trim(txtmod.Text)"' and qno = "&rn
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
txtqno.Text = rs!qno
lblqnm.Caption = rs!qnm
lblqnm.Caption = rs!qnm
lbla.Caption = rs!opt1
lblb.Caption = rs!opt2
lblc.Caption = rs!opt3
lbld.Caption = rs!opt4
qsans = rs!qans
i=i+1
Exit Sub
End Sub

Public Sub checkans()


If opta.Value = True Then
ans = "a"
chk = chk + 1
ElseIf optb.Value = True Then
ans = "b"

41 of 101

Mock Online Assessment

chk = chk + 1
ElseIf optc.Value = True Then
ans = "c"
chk = chk + 1
ElseIf optd.Value = True Then
ans = "d"
chk = chk + 1
End If
If ans = qsans Then
mar = mar + rs!qmarks
marks.Text = mar
MAIN.reddy = mar
Print mar
End If
opta.Value = False
optb.Value = False
optc.Value = False
optd.Value = False
End Sub

Private Sub Form_LostFocus()


MAIN.second = second
MAIN.qsta = qsta
End Sub

Private Sub lblqnm_Click()


End Sub

42 of 101

Mock Online Assessment

Private Sub t_Timer()


hor1 = 0
sec1 = sec1 + 1
second = second + 1
MAIN.second = second
Print second
If sec1 = 60 Then
sec1 = 0
min1 = min1 + 1
If min1 = 60 Then
min1 = 0
hor1 = hor1 + 1
If hor1 = 24 Then
hor1 = 0
End If
End If
End If
s2 = s2 - 1
If s2 = 0 Then
s2 = 60
m2 = m2 - 1
If m2 = 0 Then
m2 = 60
h2 = h2 - 1
If h2 = 0 Then
h = 24
End If
End If
End If
h6.Caption = hor1

43 of 101

Mock Online Assessment

m6.Caption = min1
s6.Caption = sec1
sec.Caption = s2
If MAIN.RT = 1 Then
m2 = "00"
End If
min.Caption = m2
hor.Caption = h2
End Sub
Private Sub tmobj_Timer()
Dim t As String
If Val(min1) = MAIN.RT Then
Call cmdres_Click
End If
End Sub
DATA REPORT OF STUDENT RESULT
Dim cn1 As ADODB.Connection
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Dim RS1 As ADODB.Recordset
Dim STR As String
Dim str1 As String
Dim a As Integer
Private Sub cmdexit_Click()
End
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection

44 of 101

Mock Online Assessment

CN.Provider = "microsoft.jet.oledb.3.51"
'cn1.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
'Set rs1 = New ADODB.Recordset
Text1.Text = MAIN.stcode
STR = "select * from result where stcode ='" & Text1.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
'rs1.Open "result", cn, adOpenDynamic, adLockOptimistic
rs.MoveLast
txtdate.Caption = rs!Date
txtunm1.Caption = MAIN.stname
txtunm2.Caption = MAIN.stname
txtuid.Caption = MAIN.stcode
txtmod.Caption = rs!modcode
'Text2.Text = main.m
'txtinfo.Caption = "a"
txttmk.Caption = MAIN.reddy
'TXTGRD.Caption = "A"
'main.gr = TXTGRD.Caption
txtt.Caption = rs!timetaken
NOQ1.Caption = rs!NOQ
'Label1.Caption = rs!sec
RESNO.Caption = rs!RESNO
'rs!grade = main.gr
'rs!marobt = main.reddy
qsta.Caption = rs!noqatmp
Label16.Caption = MAIN.lo
'rs.Update
a = ((MAIN.reddy / MAIN.ma) * 100)
If a >= 90 And a <= 100 Then
TXTGRD.Caption = "master"

45 of 101

Mock Online Assessment

ElseIf a >= 75 And a < 90 Then


TXTGRD.Caption = "dest"
ElseIf a >= 60 And a < 75 Then
TXTGRD.Caption = "first"
ElseIf a < 60 Then
TXTGRD.Caption = "fail"
Else
TXTGRD.Caption = "fail"
End If
'Else
' TXTGRD.Caption = "fail"
'End If
MAIN.gr = TXTGRD.Caption
rs!grade = TXTGRD.Caption
rs!marobt = MAIN.reddy
rs.Update

End Sub

SELECTING THE USERS FORM


Dim x As Integer
Dim y As Integer
Option Explicit

Private Sub Command1_Click()


If Option1.Value = True Then
MAIN.OPT = 1

46 of 101

Mock Online Assessment

STULOGIN.Show
End If
'ElseIf
If Option2.Value = True Then
MAIN.OPT = 2
password.Show
password.Command2.Enabled = False
End If
'ElseIf
If Option3.Value = True Then
password.Command2.Enabled = True
password.Text1.SetFocus
password.Text1.Text = ""
MAIN.OPT = 3
MDIForm1.MN_FAC.Enabled = False
password.Show
password.Command1.Enabled = False
End If
End Sub

Private Sub Form_Load()


x = 100
y = 100
End Sub
Private Sub Option4_Click()
End

47 of 101

Mock Online Assessment

End Sub
Private Sub Timer1_Timer()
If Label1.Visible = True Then
Label1.Visible = False
Else
Label1.Visible = True
End If
End Sub
Private Sub Timer2_Timer()
Image1.Left = Image1.Left + x
Image1.Top = Image1.Top + y
If Image1.Left > Me.ScaleWidth Then
x = x * -1
End If
If Image1.Left < 0 Then
x = x * -1
End If
If Image1.Top > Me.ScaleHeight Then
'top Then
y = y * -1
End If
If Image1.Top < 0 Then
y = y * -1
End If
End Sub

STAFF REGISTRATION FORM


Dim rs As ADODB.Recordset
Dim con As ADODB.Connection

48 of 101

Mock Online Assessment

Dim STR As String


Dim i As Integer
Dim s As String
Private Sub cmdexam_Click()
STAFFLOGIN.Show
End Sub
Private Sub cmdexit_Click()
SELECTUSER.Show
End Sub
Private Sub cmdmodi_Click()
Dim id As String
id = InputBox("Enter the staffcode", "modification")
rs.MoveFirst
Do While rs.EOF = False
If UCase(id) = UCase(rs!staffcode) Then
If rs.EditMode = adEditNone Then
txtid.Text = rs!staffcode
txtpsw.Text = rs!staffpsw
txtnm.Text = rs!staffname
Combo1.Text = rs!qualification
txtdate.Text = rs!Date
txtbdate.Text = rs!dob
'txtsex.Text = rs!SEX
txtmail.Text = rs!email
txtaddress.Text = rs!address
txtregno.Text = rs!phone
'txtarea.Text = rs!usarea
'Txtcity.Text = rs!uscity
'txtstate.Text = rs!usstate
End If

49 of 101

Mock Online Assessment

Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.Enabled = True
cmdsave.SetFocus
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
'cmdexam.Enabled = False
End Sub
Private Sub cmdreg_Click()
Call clear
MsgBox "You Should Remember Userid , Userpassword "
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("staffcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "LE" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "LE" & "00" & i
Else
If (i >= 100) And (i <= 999) Then
s = "LE" & "0" & i

50 of 101

Mock Online Assessment

Else
End If
End If
End If
txtid = s
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
'txtsex.Text = ""
Call LOURDU
txtaddress.Text = ""
txtregno.Text = ""
'txtarea.Text = ""
'Txtcity.Text = ""
'txtstate.Text = ""
txtpsw.SetFocus
rs.AddNew
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdsave.Enabled = True
StatusBar1.Panels(3).Text = "CLICK ON SAVE BUTTON AFTER GIVING
DETAILS "
End Sub

Private Sub cmdsave_Click()


rs!staffcode = txtid.Text
rs!staffpsw = txtpsw.Text
rs!staffname = txtnm.Text

51 of 101

Mock Online Assessment

rs!qualification = Combo1.Text
rs!email = txtmail.Text
rs!dob = txtbdate.Text
'rs!SEX = txtsex.Text
rs!address = txtaddress.Text
rs!phone = Val(txtregno.Text)
'rs!usarea = txtarea.Text
'rs!uscity = Txtcity.Text
'rs!usstate = txtstate.Text
rs!Date = txtdate.Text
rs.Update
MsgBox ("yes")
cmdreg.Enabled = False
cmdsave.Enabled = False
cmdmodi.Enabled = True
'cmdexam.Enabled = True
cmdexit.Enabled = True
'StatusBar1.Panels(3).Text = "YOUR ID IS CREATED "
'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub Form_Activate()
'CMDREG.SetFocus
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexit.Enabled = True
cmdreg.Enabled = True
cmdreg.SetFocus
End Sub

52 of 101

Mock Online Assessment

Private Sub Form_Load()


Set con = New ADODB.Connection
con.Provider = "microsoft.jet.oledb.3.51"
con.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
txtdate.Text = Date$
rs.Open "staff", con, adOpenDynamic, adLockPessimistic
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(1, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "WELCOME TO LOGIC INFOTECH PRIVATE
LIMITED "
StatusBar1.Panels(3).AutoSize = sbrSpring
'rs.Close
End Sub

'Private Sub txtnm_Change()


' KeyAscii = Asc(UCase(Chr(KeyAscii)))
' If KeyAscii = 32 Then Exit Sub
' If IsNumeric(Chr(KeyAscii)) Or _
' (KeyAscii >= 33 And KeyAscii <= 64) Or _
' (KeyAscii >= 91 And KeyAscii <= 96) Or _
' (KeyAscii >= 123 And KeyAscii <= 126) Then
' KeyAscii = 0

53 of 101

Mock Online Assessment

'StatusBar1.Panels(3).Text = "user name should be charecter"


'End If
'End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
rs!sex = "MALE"
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
rs!sex = "FEMALE"
End If
End Sub
Private Sub txtnm_GotFocus()
If txtpsw.Text = "" Then
StatusBar1.Panels(3).Text = "ENTER PASSWORD THEN NAME OF THE
STUDENT"
MsgBox " ENTER PASSWORD THEN NAME"
End If
End Sub
'Private Sub txtid_LostFocus()
'Dim lo As Integer
'If txtid.Text Like "[A-Z][A-Z]####" <> True Then
'lo = MsgBox("INCORRECT CODE", vbOKOnly, "STOP!!!!")
'txtid.SetFocus
'End If
'End Sub

54 of 101

Mock Online Assessment

Private Sub txtnm_KeyPress(KeyAscii As Integer)


Dim klr As Integer
If Not Chr(KeyAscii) Like "[A-Z]" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY ALPHABETS ALLOWED"
klr = MsgBox(" ONLY ALPHABETS ALLOWED", vbInformation, "LOGIC
INFOTECH")
End If
End Sub
Private Sub txtnm_LostFocus()
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 32 Then Exit Sub
If IsNumeric(Chr(KeyAscii)) Or _
(KeyAscii >= 33 And KeyAscii <= 64) Or _
(KeyAscii >= 91 And KeyAscii <= 96) Or _
(KeyAscii >= 123 And KeyAscii <= 126) Then
KeyAscii = 0
MsgBox ("INCORRECT DATA")
StatusBar1.Panels(3).Text = "user name should be charecter"
End If
End Sub

Private Sub Timer1_Timer()


Text1.Text = Time$
End Sub
Public Sub sho()
txtid.Text = rs!staffcode
txtpsw.Text = rs!staffpsw

55 of 101

Mock Online Assessment

txtnm.Text = rs!staffname
Combo1.Text = rs!qualification
txtdate.Text = rs!Date
txtbdate.Text = rs!dob
txtmail.Text = rs!email
'txtsex.Text = rs!SEX
Call reddy
txtaddress.Text = rs!address
txtregno = rs!phone
'txtarea.Text = rs!usarea
'Txtcity.Text = rs!uscity
'txtstate.Text = rs!usstate
End Sub
Public Sub clear()
txtid.Text = ""
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
'txtsex.Text = ""
Call LOURDU
txtaddress.Text = ""
txtregno.Text = ""
'txtarea.Text = ""
'Txtcity.Text = ""
'txtstate.Text = ""
End Sub

Private Sub txtpsw_LostFocus()

56 of 101

Mock Online Assessment

Dim lo As Integer
If Len(txtpsw.Text) < 3 Then
lo = MsgBox("MINIMUM PASSWORD LENGTH IS 3 ", vbExclamation,
"STOP!!!")
StatusBar1.Panels(3).Text = "MINIMUM PASSWORD LENGTH IS 3"
txtpsw.SetFocus
End If
End Sub
Private Sub txtregno_KeyPress(KeyAscii As Integer)
Dim res As Integer
If Not Chr(KeyAscii) Like "#" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY NUMERIC DATA ALLOWED"
res = MsgBox("ONLY NUMERIC DATA ALLOWED", vbInformation)
End If
End Sub
Private Sub txtregno_LostFocus()
Dim lo As Integer
If Len(txtregno.Text) <> 6 Then
StatusBar1.Panels(3).Text = "PHONE NUMBER MUST BE 6 INTEGERS"
lo = MsgBox("PHONE NUMBER MUST BE 6 INTEGERS", vbExclamation,
"STOP!!!")
txtregno.SetFocus
End If
End Sub

Public Sub LOURDU()


Option1.Value = False

57 of 101

Mock Online Assessment

Option2.Value = False
End Sub
Public Sub reddy()
If rs!sex = "MALE" Then
Option1.Value = True
Else
Option2.Value = True
End If
End Sub
STAFF LOGIN FORM
Dim a As Variant
Dim STR As String
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub cmdcon_Click()
If txtpsw.Text = "" Then
MsgBox " enter password"
txtpsw.SetFocus
Exit Sub
End If
STR = " SELECT * from staff where staffcode ='" & txtid.Text & "'" & " And
staffpsw = '" & txtpsw.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " ENTER THE DATA CORRECTLY "
rs.Close
txtid.SetFocus
txtid.Text = ""
txtnm.Text = ""

58 of 101

Mock Online Assessment

txtpsw.Text = ""
Exit Sub
Else
MAIN.staffcode = txtid.Text
MAIN.staffname = txtnm.Text
If MAIN.OPT = 3 Then
MDIForm1.MN_FAC.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.MN_REPO.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 2 Then
MDIForm1.MN_ADMIN.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 1 Then
cmdcre.Enabled = True
MODULE.Show
End If
End If
End Sub
Private Sub cmdcre_Click()
STAFF.Show
End Sub

Private Sub Form_Activate()


If MAIN.OPT = 1 Then
MsgBox " ENTER STAFFCODE AND PASSWORD "
Exit Sub
End If
End Sub

59 of 101

Mock Online Assessment

Private Sub Form_Load()


Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
'mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(2, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
'mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "enter id ,name and password correctly"
StatusBar1.Panels(3).AutoSize = sbrSpring
'Set mypanel = StatusBar1.Panels.Add(4)
'StatusBar1.Panels(4).Text = "enter id ,name and password correctly"

If MAIN.OPT = 2 Or MAIN.OPT = 3 Then


'cmdcre.Enabled = False
End If
End Sub

Private Sub Timer1_Timer()


Label5.BackColor = RGB(Rnd * 221, Rnd * 223, Rnd * 222)

60 of 101

Mock Online Assessment

Label5.Move a
a = a + 100
If a = 12000 Then
a = 100
End If
End Sub
LOADING FORM
Dim L%
Dim status As Boolean
Private Sub Form_DblClick()
Unload Me
Database.Show
End Sub
Private Sub Form_Load()
STARTFORM.WindowState = 2
L=0
Label1.Left = L
status = True
ProgressBar2.Visible = False
Label3.Visible = False
End Sub
Private Sub Timer1_Timer()
Static i As Integer
If status Then
L = L + 150
If Label1.Left + Label1.Width > STARTFORM.Width Then
status = False
End If

61 of 101

Mock Online Assessment

Else
L = L - 150
If Label1.Left < 0 Then
status = True
End If
End If
Label1.Left = L
i=i+1
If i Mod 1 = 0 Then
Label1.Enabled = Not Label1.Enabled
End If
End Sub
Private Sub Timer2_Timer()
'Unload Me
'Database.Visible = True
ProgressBar2.Visible = True
Label3.Visible = True
If ProgressBar2.Value = 6 Then
'frmmain.Hide
Unload Me
SELECTUSER.Show
Else
ProgressBar2.Value = ProgressBar2.Value + 1
End If
End Sub

STUDENT DETAILS FORM


Dim CN As ADODB.Connection

62 of 101

Mock Online Assessment

Dim rs As ADODB.Recordset
Dim nm As String
Dim id As String
Dim pass As String
Dim info As String

Private Sub cmddel_Click()


rs.Delete
MsgBox ("ONE RECORD DELETED")
rs.MoveNext
If rs.EOF Then rs.MoveLast
display
End Sub
Private Sub cmdexit_Click()
SELECTUSER.Show
End Sub
Private Sub cmdfirst_Click()
rs.MoveFirst
display
End Sub
Private Sub cmdlast_Click()
rs.MoveLast
display
End Sub

Private Sub cmdmodi_Click()

63 of 101

Mock Online Assessment

Dim id As String
id = InputBox("Enter the user id", "modification")
rs.MoveFirst
Do While rs.EOF = False
If UCase(id) = UCase(rs!stcode) Then
If rs.EditMode = adEditNone Then
txtid.Text = rs!stcode
txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
txtsex.Text = rs!sex
txtmail.Text = rs!email
txtaddress.Text = rs!address
txtregno.Text = rs!registerno
End If
Exit Do
Else
rs.MoveNext
End If
Loop
'cmdsave.Enabled = True
'cmdsave.SetFocus
'cmdreg.Enabled = False
'cmdexit.Enabled = False
'cmdmodi.Enabled = False
'cmdexam.Enabled = False
End Sub

64 of 101

Mock Online Assessment

Private Sub cmdnext_Click()


rs.MoveNext
If rs.EOF Then rs.MoveLast
display
End Sub
Private Sub cmdpre_Click()
rs.MovePrevious
If rs.BOF Then rs.MoveFirst
display
End Sub
Private Sub cmdsave_Click()
rs!stcode = txtid.Text
rs!stpsw = txtpsw.Text
rs!stname = txtnm.Text
rs!qualification = Combo1.Text
rs!email = txtmail.Text
rs!dob = txtbdate.Text
rs!sex = txtsex.Text
rs!address = txtaddress.Text
rs!registerno = txtregno
rs!Date = txtdate.Text
rs.Update
MsgBox ("yes")
cmdadd.Enabled = True
cmdsave.Enabled = False
cmdmodi.Enabled = True
'cmdexam.Enabled = True
cmdexit.Enabled = True
'StatusBar1.Panels(3).Text = "YOUR ID IS CREATED "

65 of 101

Mock Online Assessment

'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub cmdadd_Click()
Call clear
MsgBox "You Should Remember studentcode and student password "
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("stcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "ST" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "ST" & "00" & i
Else
If (i >= 100) And (i <= 999) Then
s = "ST" & "0" & i
Else
End If
End If
End If
txtid = s
txtpsw.Text = ""
txtnm.Text = ""

66 of 101

Mock Online Assessment

Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
txtsex.Text = ""
txtaddress.Text = ""
txtregno = ""
txtpsw.SetFocus
rs.AddNew
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdsave.Enabled = True
'StatusBar1.Panels(3).Text = "CLICK ON SAVE BUTTON AFTER DETAILS "
End Sub
Private Sub Form_Activate()
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexit.Enabled = True
cmdadd.Enabled = True
cmdadd.SetFocus
End Sub
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
rs.Open "student", CN, adOpenDynamic, adLockOptimistic
txtdate = Date$
'display
End Sub

67 of 101

Mock Online Assessment

Public Sub display()


txtid.Text = rs!stcode
txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
txtmail.Text = rs!email
txtsex.Text = rs!sex
txtaddress.Text = rs!address
'txtregno = rs!registerno
End Sub
Public Sub clear()
txtid.Text = ""
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
txtsex.Text = ""
txtaddress = ""
txtregno = ""
End Sub

Private Sub Timer1_Timer()


Text1.Text = Time$
End Sub

STUDENT REGISTRATION FORM


Dim rs As ADODB.Recordset

68 of 101

Mock Online Assessment

Dim RS1 As ADODB.Recordset


Dim con As ADODB.Connection
Dim STR As String
Dim i As Integer
Dim s As String
Private Sub cmdexam_Click()
STULOGIN.Show
End Sub
Private Sub cmdexit_Click()
SELECTUSER.Show
End Sub
Private Sub cmdmodi_Click()
Dim id As String
id = InputBox("Enter the student code", "modification")
rs.MoveFirst
Do While rs.EOF = False
If UCase(id) = UCase(rs!stcode) Then
If rs.EditMode = adEditNone Then
txtid.Text = rs!stcode
txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
'txtsex.Text = rs!SEX
txtmail.Text = rs!email
txtaddress.Text = rs!address
txtregno.Text = rs!phone
End If

69 of 101

Mock Online Assessment

Exit Do
Else
rs.MoveNext
End If
Loop
cmdsave.Enabled = True
cmdsave.SetFocus
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdexam.Enabled = False
End Sub
Private Sub cmdreg_Click()
Call clear
MsgBox

"YOU

SHOULD

REMEMBER

STUDENTCODE,

STUDENT

PASSWORD"
If rs.EOF() Then
MsgBox "NO RECORDS AVAIBLE"
i=0
Else
rs.MoveLast
i = Val(Mid$(rs.Fields("stcode"), 3, 4))
End If
i=i+1
If (i > 0) And (i <= 9) Then
s = "ST" & "000" & i
Else
If (i >= 10) And (i <= 99) Then
s = "ST" & "00" & i
Else
If (i >= 100) And (i <= 999) Then

70 of 101

Mock Online Assessment

s = "ST" & "0" & i


Else
End If
End If
End If
txtid = s
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
Call lo
'txtsex.Text = ""
txtaddress.Text = ""
txtregno.Text = ""
'txtarea.Text = ""
'Txtcity.Text = ""
'txtstate.Text = ""
txtpsw.SetFocus
rs.AddNew
cmdreg.Enabled = False
cmdexit.Enabled = False
cmdmodi.Enabled = False
cmdsave.Enabled = True
StatusBar1.Panels(3).Text = "CLICK ON SAVE BUTTON AFTER GIVING
DETAILS "
End Sub

Private Sub cmdsave_Click()


rs!stcode = txtid.Text
rs!stpsw = txtpsw.Text

71 of 101

Mock Online Assessment

rs!stname = txtnm.Text
rs!qualification = Combo1.Text
rs!email = txtmail.Text
rs!dob = txtbdate.Text
'rs!SEX = txtsex.Text
rs!address = txtaddress.Text
rs!phone = Val(txtregno.Text)
'rs!usarea = txtarea.Text
'rs!uscity = Txtcity.Text
'rs!usstate = txtstate.Text
rs!Date = txtdate.Text
rs.Update
MsgBox ("yes")
cmdreg.Enabled = False
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexam.Enabled = True
cmdexit.Enabled = True
'StatusBar1.Panels(3).Text = "YOUR ID IS CREATED "
'xy:
' MsgBox " YOUR USER-ID IS ALREADY CREATED TAKE SOME OTHER
NUMBER "
End Sub
Private Sub Form_Activate()
'CMDREG.SetFocus
cmdsave.Enabled = False
cmdmodi.Enabled = True
cmdexam.Enabled = False
cmdexit.Enabled = True
cmdreg.Enabled = True
cmdreg.SetFocus

72 of 101

Mock Online Assessment

End Sub
Private Sub Form_Load()
Set con = New ADODB.Connection
con.Provider = "microsoft.jet.oledb.3.51"
con.Open "D:/lourdu/exam.mdb"
Set rs = New ADODB.Recordset
txtdate.Text = Date$
'Text1.Text = Time$
rs.Open "student", con, adOpenDynamic, adLockPessimistic
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(1, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "WELCOME TO ONLINE EXAM
StatusBar1.Panels(3).AutoSize = sbrSpring
'rs.Close
End Sub
'Private Sub txtnm_Change()
'KeyAscii = Asc(UCase(Chr(KeyAscii)))
'If KeyAscii = 32 Then Exit Sub
' If IsNumeric(Chr(KeyAscii)) Or _
' (KeyAscii >= 33 And KeyAscii <= 64) Or _
' (KeyAscii >= 91 And KeyAscii <= 96) Or _
' (KeyAscii >= 123 And KeyAscii <= 126) Then

73 of 101

Mock Online Assessment

' KeyAscii = 0
' statusBar1.Panels(3).Text = "user name should be charecter"
'End If
'End Sub

Private Sub Option1_Click()


If Option1.Value = True Then
rs!sex = "MALE"
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
rs!sex = "FEMALE"
End If
End Sub
'Private Sub txtid_LostFocus()
'Dim lo As Integer
'If txtid.Text Like "[A-Z][A-Z]####" <> True Then
'lo = MsgBox("INCORRECT CODE", vbOKOnly, "STOP!!!!")
'txtid.SetFocus
'End If
'End Sub
Private Sub txtnm_GotFocus()
If txtpsw.Text = "" Then
StatusBar1.Panels(3).Text = " ENTER PASSWORD THEN NAME "
MsgBox " ENTER PASSWORD THEN NAME "

74 of 101

Mock Online Assessment

txtpsw.SetFocus
End If
End Sub
Private Sub txtnm_KeyPress(KeyAscii As Integer)
Dim klr As Integer
If Not Chr(KeyAscii) Like "[A-Z]" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY ALPHABETS ALLOWED"
klr = MsgBox(" ONLY ALPHABETS ALLOWED", vbInformation, "LOGIC
INFOTECH")
End If
End Sub
Private Sub txtnm_LostFocus()
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 32 Then Exit Sub
If IsNumeric(Chr(KeyAscii)) Or _
(KeyAscii >= 33 And KeyAscii <= 64) Or _
(KeyAscii >= 91 And KeyAscii <= 96) Or _
(KeyAscii >= 123 And KeyAscii <= 126) Then
KeyAscii = 0
MsgBox ("INCORRECT DATA")
StatusBar1.Panels(3).Text = "user name should be charecter"
End If
End Sub
Private Sub Timer1_Timer()
Text1.Text = Time$
End Sub
Public Sub sho()
txtid.Text = rs!stcode

75 of 101

Mock Online Assessment

txtpsw.Text = rs!stpsw
txtnm.Text = rs!stname
Combo1.Text = rs!qualification
txtdate.Text = Format(rs!Date, "MM/DD/YYYY")
txtbdate.Text = Format(rs!dob, "MM/DD/YYYY")
txtmail.Text = rs!email
'txtsex.Text = rs!SEX
Call OP
txtaddress.Text = rs!address
txtregno = rs!phone
'txtarea.Text = rs!usarea
'Txtcity.Text = rs!uscity
'txtstate.Text = rs!usstate
End Sub
Public Sub clear()
txtid.Text = ""
txtpsw.Text = ""
txtnm.Text = ""
Combo1.Text = ""
txtmail.Text = ""
txtbdate.Text = ""
Call lo
'txtsex.Text = ""
txtaddress.Text = ""
txtregno.Text = ""
End Sub

Private Sub txtpsw_LostFocus()


Dim lo As Integer

76 of 101

Mock Online Assessment

If Len(txtpsw.Text) < 3 Then


lo = MsgBox("MINIMUM PASSWORD LENGTH IS 3 ", vbExclamation,
"STOP!!!")
StatusBar1.Panels(3).Text = "MINIMUM PASSWORD LENGTH IS 3"
txtpsw.SetFocus
End If
End Sub
Private Sub txtregno_KeyPress(KeyAscii As Integer)
Dim res As Integer
If Not Chr(KeyAscii) Like "#" Then
KeyAscii = 0
StatusBar1.Panels(3).Text = "ONLY NUMERIC DATA ALLOWED"
res = MsgBox("ONLY NUMERIC DATA ALLOWED", vbInformation)
End If
End Sub
Private Sub txtregno_LostFocus()
Dim lo As Integer
If Len(txtregno.Text) <> 6 Then
StatusBar1.Panels(3).Text = "PHONE NUMBER MUST BE 6 INTEGERS"
lo = MsgBox("PHONE NUMBER MUST BE 6 INTEGERS", vbExclamation,
"STOP!!!")
txtregno.SetFocus
End If
End Sub

Public Sub OP()


If rs!sex = "MALE" Then
Option1.Value = True
Else

77 of 101

Mock Online Assessment

Option2.Value = True
End If
End Sub
Public Sub lo()
Option1.Value = False
Option2.Value = False
End Sub

STUDENT LOGIN FORM


Dim a As Variant
Dim STR As String
Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub cmdcon_Click()
'If txtpsw.Text = "" Then
'MsgBox " enter password"
'txtpsw.SetFocus
'Exit Sub
'End If
'STR = " SELECT * from student where stcode ='" & txtid.Text & "'" & " And stpsw
= '" & txtpsw.Text & "'"
STR = " SELECT * from student where stcode ='" & txtid.Text & "'" & " AND
stname ='" & txtnm.Text & "'" & " AND stpsw = '" & txtpsw.Text & "'"
rs.Open STR, CN, adOpenDynamic, adLockOptimistic
If rs.EOF And rs.BOF Then
MsgBox " ENTER DATA CORRECTLY "
rs.Close
txtid.SetFocus
txtid.Text = ""
txtnm.Text = ""

78 of 101

Mock Online Assessment

txtpsw.Text = ""
Exit Sub
Else
MAIN.stcode = txtid.Text
MAIN.stname = txtnm.Text
If MAIN.OPT = 3 Then
MDIForm1.MN_FAC.Enabled = False
' MDIForm1.MN_EXAM.Enabled = False
MDIForm1.MN_REPO.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 2 Then
MDIForm1.MN_ADMIN.Enabled = False
'MDIForm1.MN_EXAM.Enabled = False
MDIForm1.Show
ElseIf MAIN.OPT = 1 Then
cmdcre.Enabled = True
'MODULE.Show
LOMOD.Show
End If
End If
End Sub
Private Sub cmdcre_Click()
STUDENT.Show
End Sub

Private Sub Command1_Click()


PRERESULT.Show
End Sub

79 of 101

Mock Online Assessment

Private Sub Form_Activate()


If MAIN.OPT = 1 Then
MsgBox " ENTER STUDENT CODE, NAME, PASSWORD "
Exit Sub
End If
End Sub

Private Sub Form_Load()


Set CN = New ADODB.Connection
CN.Provider = "microsoft.jet.oledb.3.51"
CN.Open "D:/Type of project/exam/exam/exam.mdb"
Set rs = New ADODB.Recordset
Dim mypanel As Panel
StatusBar1.Panels.clear
Set mypanel = StatusBar1.Panels.Add(1, , , sbrDate)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
Set mypanel = StatusBar1.Panels.Add(2, , , sbrTime)
mypanel.AutoSize = sbrNoAutoSize
mypanel.Bevel = sbrInset
mypanel.Alignment = sbrLeft
Set mypanel = StatusBar1.Panels.Add(3)
StatusBar1.Panels(3).Text = "ENTER STUDENT CODE, STUDENT NAME,
STUDENT PASSWORD CORRECTLY"
StatusBar1.Panels(3).AutoSize = sbrSpring
'Set mypanel = StatusBar1.Panels.Add(4)
'StatusBar1.Panels(4).Text = "enter id ,name and password correctly"
If MAIN.OPT = 2 Or MAIN.OPT = 3 Then
cmdcre.Enabled = False
End If

80 of 101

Mock Online Assessment

End Sub

Private Sub Timer1_Timer()


Label5.BackColor = RGB(Rnd * 221, Rnd * 223, Rnd * 222)
Label5.Move a
a = a + 100
If a = 12000 Then
a = 100
End If
End Sub

81 of 101

Mock Online Assessment

Snap-Shot

FIGURE 1:
STARTING FORM OF THE PROJECT

82 of 101

Mock Online Assessment

FIGURE 2:
LOADING FORM OF THE PROJECT

ONLINE EXAM

83 of 101

Mock Online Assessment

FIGURE 3:
SELECTING THE USER FORM

84 of 101

Mock Online Assessment

FIGURE 4:
STUDENT LOGIN FORM FOR ENTERING ON LINE EXAM

WEL COME TO ONLINE EXAM


85 of 101

Mock Online Assessment

FIGURE 5:
EXAMINATION DETAILS

86 of 101

Mock Online Assessment

FIGURE 6:
FORM TO REVIEW EXAM DETAILS

87 of 101

Mock Online Assessment

FIGURE 7:
MDI FORM

88 of 101

Mock Online Assessment

FIGURE 8:
LOGIN FORM FOR ADMINISTRATOR AND STAFF

FIGURE 9:
QUESTION PAPER FORM

89 of 101

Mock Online Assessment

FIGURE 10:
REPORT OF THE STUDENT RESULT

90 of 101

Mock Online Assessment

FIGURE 11:
FORM TO VIEW THE STUDENT RESULT

91 of 101

Mock Online Assessment

FIGURE 12:
DATA REPORT OF THE STUDENT RESULT

92 of 101

Mock Online Assessment

FIGURE 13:
STUDENT REGISTRATION FORM

93 of 101

Mock Online Assessment

94 of 101

Mock Online Assessment

95 of 101

Mock Online Assessment

FIGURE 14:
STUDENT DETAILS FORM

96 of 101

Mock Online Assessment

Testing

97 of 101

Mock Online Assessment

TESTING
The common overview of testing held by users is that it is performed to prove
that there are no errors in a program. This is extremely difficult since designer cannot
prove to be one hundred percent accurate. Therefore, the most useful and practical
approach is with understanding that testing is the process of executing a program with
explicit intention of finding errors that make the program fail.
Testing has its own cycle. The testing process begins with the product
requirements phase and from there parallels the entire development process. In other
words, for each phase of the development process there is an important testing
activity. Successful testing requires a methodical approach. It requires focusing on
basic critical factors:

Planning

Project and process control

Risk management

Inspections

Measurement tools

Organization and professionalism

Test plan:
Before going for testing, first we have to decide upon the type of testing to be carried
out. The following factors are taken into considerations:

To ensure that information properly flows into and out of program

To find out whether the local data structures maintains its integrity
during all steps in an algorithm execution.

98 of 101

Mock Online Assessment

To ensure that the module operate properly at boundaries established


to limit or restrict processing.

To find out whether error handling paths are working correctly or not

To find out whether the values are correctly updated or not

Check for validations.

Unit Testing: Unit or module testing is the process of testing the individual
components (subprograms or procedures) of a program. The purpose is to discover
discrepancies between the modules interface specification and its actual behavior.
Integration testing
Integration testing is the process of combining and testing multiple
components together. The primary objective of integration testing is to discover errors
in the interfaces between the components. In our system each of the modules
mentioned above are tested for checking the integration between them, after each of
them are tested individually.

99 of 101

Mock Online Assessment

CONCLUSION
The project entitled Mock Online Assessment has been successfully
developed and implemented. The testing was carried out by dividing the project into
different modules.
The purpose of this project was easily solved by providing software that could
provide the facility to the students to interact with the software and can appear for
online exam and get instant result within seconds. These projects interact with
different users such as administrator where he is responsible for database records.
Staff is responsible for preparing question and evaluating the result.

100 of 101

Mock Online Assessment

Bibliography

Training from the Source


By Khristine Annwn Page, Khristine Page
101 of 101

Mock Online Assessment

Teach yourself visual basic Application Development in 21 Days


By John Ray

The Complete Idiot's Guide to visual basic 6.0.


By David Karlins

Visual basic 6.0 Black Book: The Programmer's Complete Reference Book
By Steven Holzner

102 of 101

You might also like