Anda di halaman 1dari 81

Synopsis The Project is entitled School Management System.

The main objective of this project is to computerize the school management process. Our project is used to reduce the manual work. School Management System deals with all kind of student details, academic related reports, school details, standard details, curriculum, batch details and other resource related details too. It tracks all the details of a student from the day one to the end of his course which can be used for all reporting purpose, tracking of attendance, progress in the course, completed semesters years, coming semester year curriculum details, exam details, project or any other assignment details, final exam result; and all these will be available for future references too. Our program will have the databases of Courses offered by the school or main streams, teacher or faculty's details, batch execution details, students' details in all aspects. This program can facilitate us explore all the activities happening in the school, even we can get to know which teacher / faculty is assigned to which batch, the current status of a batch, attendance percentage of a batch and upcoming requirements of a batch. Different reports and Queries can be generated based of vast options related to students, batch, course, teacher / faculty, exams, semesters, certification and even for the entire college. This Project is made using visual basic 6 as front end and Microsoft Access as back end.

MODULES DESCRIPTION: Admission Info Staff Info Mark Info Attendance Info Fees Info Receipt Info Admission Info:
This module deals with the student admission details and personnel details. This module consists of the tables School Management System Student academic and School Management System Student personal details.

Staff Info: Administrator fills the registration form by giving the personal information of staff and successfully registers with this software. Staff can access mark details and attendance details. Mark Info: Term wise student mark details are entered here. The entire student in the school, mark details are maintained here. Attendance Info The Administrator or the staff Login to the software registered attendance and verifies for attendance Information of student. By using this module, admin can find out irregular student.

Fees Info Admin can register the fees details of the student. In this section term wise fees details are maintained here. Receipt Info Computerized receipt details are maintained here.

CONTENTS

Chapter No 1.

Title Introduction 1.1. 1.2. Organization Profile Problem Statement

Page No 1

2.

System Analysis 2.1. Approach 2.2. Existing System 2.3. Proposed System 2.4. Need For Computerization

3.

System Configuration 3.1. Hardware Configuration 3.2. Software Configuration

4.

System Development 4.1. Project Specification 4.2. Module Description 4.3. Form Validation

5.

System Design 5.1. Input Design 5.2. Code Design 5.3. Database Design 5.4. Output Design 5.5. Data Flow Diagram

6. 7. 8. 9. 10.

Testing and Implementation Future Enhancement Conclusion Bibliography Appendices A. Input Screen B. Sampling Code

Chapter1

INTRODUCTION
1.1 Organization Profile

1.2 Problem Statement This project School Management System deals with computerizing the school management process. The student management system is an automated version of manual School management System. It can handle all details about a school. The details include school details, subject details, student personnel details, academic details, exam details etc. In case of manual system they need a lot of time, manpower etc. Here almost all work is computerized. So the accuracy is maintained. Maintaining backup is very easy. It can do with in a few minutes. It introduces a new channel to interact with members. It adapts to all networks. This is the objective of the project.

Chapter 2

SYSTEM ANALYSIS
2. 2.1. APPROACH The data which were manually collected and the same is analyzed for computerization. System Analysis means the set of requirement and the description for the new system. This aims to understand how an existing system operation there by project to proposed system. SYSTEM ANALYSIS

2.2. EXISTING SYSTEM


Today in colleges student details are entered manually. The student details in separate records are tedious task. Referring to all these records and updating is needed. There is a chance for more manual errors.

LIMITATTIONS OF EXISTING SYSTEM: 1. They limited to only one product and limited cities. 2. No effective communication between user and the vendor. 3. Products limited to only one rental show room. 2.3.Proposed System Proposed system is being developed using Asp.net as front end and Ms-Access as back end. The aim of proposed system is to develop a system of improved facilities. The proposed system can overcome all the limitations of the existing system. 1. Easy to handle and feasible. 2. Cost Reduction. 3. Fast and Convenient. 4. Administration play vital role here. 5. Paper work reduction. 6. Greater Efficiency.

ADVANTAGES OF THE PROPOSED SYSTEM:

The system is very simple in design and to implement. The system requires very low system resources and the system will work in almost all configurations.

1. Security of data. 2. Proper control of administrator 3. Minimum time for needed for the various processing. 4. Greater efficiency & Better service. 5. Admin can add a new staff account whenever he wants. 6. Admin can control overall system. 2.4 NEED FOR COMPUTERIZATION The storage and the retrieval of the data were difficult and data entry was time consuming are some of the reasons for computerization are:

Can be used to give operational characteristics. For the users comfort ability. To achieve secrecy and confidentiality Its user friendly and helps in obtaining knowledge.

Chapter 3

System Configuration
3.SYSTEM CONFIGURATION 3.1.Software requirements: Operating System Server: Windows XP or later Database Server: MS- Access Tools: Microsoft Visual Basic 6 Code Behind: Visual Basic

3.2.Hardware Specification: Processor: Intel Pentium or More Ram: 512 MB Ram Hard Disk: PC with 20GB

Chapter 4

System Specifications
4.SYSTEM SPECIFICATIONS 4.1 PROJECT SPECIFICATION MICROSOFT WINDOWS XP Microsoft Windows XP is a series of operating systems produced by Microsoft. Microsoft introduced an operating environment named windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces (GUIs). Microsoft

Windows came to dominate the worlds personal computer market, overtaking Mac OS, which has been introduced in 1984. The most recent client version of Windows is Windows 7; the most recent server version is Windows server 2008 R2; the most recent mobile version is Windows Phone 7. Future of Windows XP The window XP service pack is the operating system which provides more security, flexibility and high performance in comparison with the previous version and offers full level compatibility with the windows updating and innovative support services creates the best desktop operating system for business. Architectural independence Less Crashing Faster Internet Performance Better Photo Handling and Printing Treats a CD-RW like a real drive System Restore Centralized Administration Large memory space Remote access server MICROSOFT VISUAL BASIC Visual Basic (VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. Visual Basic is designed to be relatively easy to learn and use .Visual Basic was derived from BASIC and enables the rapid application development (RED) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, Or ActiveX Data Objects and creation ActiveX controls and objects. Programs written on Visual Basic can also use the Windows API, but doing so requires external function declarations. Properties, Events and Methods: Properties define the characteristic of a size and color etc. sometimes it is the way in which it behaves the method is as action that can he performed on objects.VB forms and controls are object, which expose the own properties, methods and events. Developing an Application: Visual programming Setup Code programming Setup

Visual basic involves designing an application with various tools. The code programming step involves writing the program using a text editor. Programming Fundamentals:

Visual basic uses building blocks such as variables, Data types Procedures, Functions and Controls structures in its programming environment. Using the Menu Editor: A Menu Editor can be used to add a new command to the existing menu which creates menu bar, change or delete an existing menu. Data Environment: The Data Environment Designer allows quick and building of hierarchical record set during the design time. Programming is the result in Data Environment Object however requires the knowledge of ADO programming Model combines with the characters of hierarchical record set. Element used in Visual basic: The Text Box: The text box is the standard control for accepting input from the user as well as to display the output. It can handle string (text) and numeric data but not images or pictures. String in a text box can be converted to a numeric data by using the function Val (text).

The Label Box: The label is a very useful control for Visual Basic, as it is not only used to provide instructions and guides to the users, it can also be used to display outputs. One of its most important properties is caption. Using the syntax Label Caption, it can display text and numeric data. You can change caption in the properties window and also at runtime. The Command Button: The command button is one of the most important controls as it is used to execute commands. It display an illusion that the button is pressed when the user click on it. The most common event associated with the command button is the click event. The Image Box: The Image Box is another control that handles images and pictures. It functions almost identically to the picture box. However, there is one major difference, the image in an image box is stretchable, which means it can be resizes. This features is not available in the picture Box. The Combo Box: The function of the combo Box is also to present a list of items where the user can click and select the items from the list. However, the user needs to click on the small arrowed head on the right of the combo box to see the items which are presented in a dropdown list. In order to add items to the list, you can also use the Add Item method. The Check Box: The Check Box control lets the user selects or unselects an option. When the Check Box is checked, its value is set to 1 and when it is unchecked, the value is set to 0. You can include the statements check1. Value=1 to mark the Check Box and Check1.Value=0 to unmark the Check Box, as well as use them to initiate certain actions. 4.2. MODULE DESCRIPTION

Admission Info Staff Info Mark Info Attendance Info Fees Info Receipt Info

Admission Info:
This module deals with the student admission details and personnel details. This module consists of the tables School Management System Student academic and School Management System Student personal details.

Staff Info: Administrator fills the registration form by giving the personal information of staff and successfully registers with this software. Staff can access mark details and attendance details. Mark Info: Term wise student mark details are entered here. The entire student in the school, mark details are maintained here. Attendance Info The Administrator or the staff Login to the software registered attendance and verifies for attendance Information of student. By using this module, admin can find out irregular student. Fees Info Admin can register the fees details of the student. In this section term wise fees details are maintained here. Receipt Info Computerized receipt details are maintained here.

4.3 FORM VALIDATION Owner Info Form: Validation was done to ensure that the owner has entered numeric values in numeric fields and has entered the alphabets for text fields and has entered the correct date in the date/time field. Member Info Form: Validation was done to ensure that the member has entered numeric values in numeric fields and has entered the alphabets for text fields and has entered the correct date in the date/time field. Property Info Form: Each field was tested by the programmer. Validation was done to ensure the owner has enters a numeric value in the amount field.

Chapter 5

System Design
5.SYSTEM DESIGN Design is a iterative process thought which requirements a translated into or blue print for constructing the software design must implement all the implicit all threw implicit requirements and explicit requirements. It must be a readable and understandable. It is not coding. The initial focus of the project will be on in-house league formats. However, the user interface is designed to organize the users' data efficiently and intuitively and can be easily extended to support almost any kind of athletic event. The scheduling system will be developed in Java, while web-based components will be developed in HTML.

5.1.Input Design Input design is the process of converting a user-oriented description of the input into a computerbased system. This design is important to avoid errors in the data input process and show the correct direction to the management for getting correct information from the computerized system. It is achieved by creating user-friendly screens for the data entry to handle large volume of data. The goal of designing input is to make data entry easier and to free from errors. The data entry screens is designed such a way that all the data manipulates can be performed. It also provides record viewing facilities. When the data is entered it will check for its validity. Data can be entered with the help of the screen. Appropriate message are provided as when needed so that the user will not be in maize of instant. The design of input focuses on controlling the amount of input required, controlling the errors, avoiding delay, avoiding extra steps and keeping the process simple. The input is designed in such a way so that it provides security. 5.2.CODE DESIGN A code is an ordered collection of symbols designed to prove unique identification to an entry or an attribute. Purpose of using code is: To achieve unique identification. Can be used instead of the name. To specify an objects physical or performance characteristics. Can be used to give Operational characteristics. 5.3.DATA BASE DESIGN Table : Login Field Name LoginId Username Password Usertype Data Type Number Text Text Text Size 20 50 50 50 Description Login Id User Name Password User Type

Table : Admission Info Field Name Admissionid Name Regno Dateofbirth Data Type Number Text Number Date/Time Size 20 50 20 Description Admission Id Name Register Number

Gender Dateofjoin Father Mother Address Phoneno Rn Bloodgroup Joinofstd Currentstd Previousschool Previoustcnno Status Table : Attendance Info Field Name ADate StdSec RollNo RegNo StuName Attendance

Text Date/Time Text Text Text Text Text Text Text Text Text Text Text

50

Gender Date of joining

50 50 50 50 50 50 50 50 50 50 50

Father Name Mother Name Address Phone Number Roll Number Blood Group Join of standard Current standard Previous school Previous tc no Status

Data Type Date/Time Text Text Text Text Text

Size

Description

50 50 50 50 50

Standard and Section Roll Number Register Number Student Name Attendance

Table : Fees Details Info Field Name Std FirstmidTerm SecondMidTerm ThirdMidTerm FulTerm Data Type Text Number Number Number Number Size 50 20 20 20 20 Description Standard First Mid Term Second Mid Term Third Mid Term Full Term

Table : Fees Info Field Name FeesId FeesName Description Feesamount Data Type Number Text Text Number Size 20 50 50 20 Description Fees Id Fees Name Description Fees Amount

Table : Mark Details Field Name RegNo StdSec Mark01 Mark02 Mark03 Mark04 Mark05 Mark06 Mark07 Mark08 Mark09 Mark10 Mark11 Mark12 Mark13 Mark14 Mark15 Mark16 Mark17 Mark18 Mark19 Mark20 Mark21 Mark22 Mark23 Mark24 Mark25 Mark26 Mark27 Mark28 Mark29 Mark30 Mark31 Mark32 Mark33 Mark34 Data Type Text Text Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Size 50 50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Description Register Number Student Section Mark01 Mark02 Mark03 Mark04 Mark05 Mark06 Mark07 Mark08 Mark09 Mark10 Mark11 Mark12 Mark13 Mark14 Mark15 Mark16 Mark17 Mark18 Mark19 Mark20 Mark21 Mark22 Mark23 Mark24 Mark25 Mark26 Mark27 Mark28 Mark29 Mark30 Mark31 Mark32 Mark33 Mark34

Mark35 Mark36

Number Number

20 20

Mark35 Mark36

Table : Mark Info Field Name Markid Name Regno Stdsec Subjectname Examtype Examyear Mark Result Data Type Number Text Number Text Text Text Text Number Text Size 20 50 20 50 50 50 50 20 50 Description Mark Id Name Register Number Standard section Subject Name Exam Type Exam Year Mark Result

Table : Receipt Field Name Receiptid Name Regno Stdsec Rdate Feesname Feesamount Data Type Number Text Number Text Date/Time Text Text 50 50 Size 20 50 20 50 Description Receipt Id Name Register Number Standard And Section Receipt date Fees Name Fees Amount

Table : Staff Info Field Name Staffid Name DateofBirth Phoneno Adress Dateofjoing Gender Fatherhusband Martialstatus Data Type Number Text Date/Time Text Text Date/Time Text Text Text 50 50 50 50 50 Size 20 50 Description Staff Id Name Date of Birth Phone Number Address Date of Joining Gender Father/Husband Marital status

Qualification Handlingsub Handlingclass Mailid Bloodgroup Experience Status Stype Rollname Previusscholname handlingsub2 handlingsub3 handlingclass2 handlingclass3

Text Text Text Text Text Text Text Text Text Text Text Text Text Text

50 50 50 50 50 50 50 50 50 50 50 50 50 50

Qualification Handling subject Handling class Mail Id Blood Group Experience Status Type Roll Number Previous school Name Handling Subject 2 Handling Subject 3 Handling Class 2 Handling class 3

Table : Subject Info Field Name subjectId Subjectname Stdsec Data Type Number Text Text Size 20 50 50 Description Subject Id Subject Name Standard Section

5.4.Output Design Designing computer output should processed in an organized, well thought out manner; the right output must be developed while ensuring that each output element is designed so that people will find the system can use easily and effectively. When analysis designs computer output should design: Identify the specific output that is needed to meet the requirements. Create document, report, or other formats that contain information produced by the system. Select the appropriate methods for presenting the information. A quality output is one, which meets the requirements of the end user and presents the information clearly. In output designs it is determined how the information is to be displaced for immediate need and also the hard copy output. It is the most important and direct source information to the user. Efficient and intelligent output design improves the systems relationship to help user decision making.

5.5Data Flow Diagram

User

Service

Fig9.1 LEVEL 1 DFD

USER

SIGN UP

-H

LOGIN

REGISTERED MEMBER

USER ADMINISTRATOR

DATA BASE ACCES VIEW

DATABASE

SIGN OUT

Chapter 6

Testing and Implementation


28

6. SYSTEM IMPLEMENTATION AND TESTING 6.1.SYSTEM TESTING A strategy for software testing may also be viewed in the context of the spiral. Unit testing begins at the vertex of the spiral and concentrates on each unit of the software as implemented in source code. Testing progress by moving outward along the spiral to integration testing, where the focus is on the design and the construction of the software architecture. Talking another turn on outward on the spiral we encounter validation testing where requirements established as part of software requirements analysis are validated against the software that has been constructed. Finally we arrive at system testing, where the software and other system elements are tested as a whole. UNIT TESTING All modules were tested and individually as soon as they were completed and were checked for their correct functionality. Unit testing focuses verification effort on the smallest unit of software design, the module. The unit testing we have is white box oriented and some modules the steps are conducted in parallel. To follow the concept of white box testing we have tested each form .we have created independently to verify that Data flow is correct, All conditions are exercised to check their validity, All loops are executed on their boundaries. INTEGRATION TESTING The entire project was split into small program; each of this single programs gives a frame as an output. These programs were tested individually; at last all these programs where combined together by creating another program where all these constructors were used. It give a lot of problem by not functioning is an integrated manner. The user interface testing is important since the user has to declare that the arrangements made in frames are convenient and it is satisfied. when the frames where given for the test, the end user gave suggestion. Based on their suggestions the frames where modified and put into practice.

29

VALIDATION TESTING At the culmination of the black box testing software is completely assembled as a package. Interfacing errors have been uncovered and corrected and a final series of test i.e., Validation succeeds when the software function in a manner that can be reasonably Accepted by the customer. 6.2. SYSTEM IMPLEMENTATION System implementation is stage in the project where the theoretical design is turned into the working system. The most crucial stage is giving the users confidence that the new system will work effectively and efficiently. The performance of reliability of the system is tested and it gained acceptance. The system was implemented successfully. Implementation is a process that means converting a new system in to operation. Proper implementation is essential to provide a reliable system to meet organization requirements. During the implementation stage a live demon was undertaken and made in front of end-users. The various features provided in the system were discussed during implementation.

30

7.FUTURE ENHANCEMENT The current application developed is in accordance with the request that has been provided by the organization. On regarding the future enhancement, the application can further expanded in accordance with changing scenario. Since the change in testing and user needs arises frequently in certain short intervals of time, the application can be further upgraded to meet the requirements that may arise in the far or near future. With regarding to the needs that arises, more and more features can be included by adding it as separate modules and integrate it with the existing system.

31

Chapter 8

Conclusion

32

8.CONCLUSION

The main purpose of SCHOOL MANANGEMENT SYSTEM is to computerized all the process of school management system. The system has been developed with much care that it is
free of errors and at the same time it is efficient and less time consuming. The important thing is that the system is robust. Avoid malfunction from outsiders .It goes through all phases of software development cycle. So product is accurate. Also provision is provided for future developments in the system.

33

Chapter 10

Appendices

34

APPENDICES A.INPUT SCREEN Main Form

Staff Info Page

35

Mark Info Page

36

Attendance Info

Fees Details Page

37

Fees Info

B.SAMPLE CODE Login Form Private Sub cmbUserType_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdLogin.SetFocus End If End Sub Private Sub CmdClear_Click() txtUserId.Text = "" txtPassword.Text = "" cmbUserType.Text = ""
38

txtUserId.SetFocus End Sub Private Sub cmdExit_Click() End End Sub Private Sub cmdLogin_Click() Dim IsValidUser As Boolean IsValidUser = False If txtUserId.Text = "" Then MsgBox "Please Enter the User Id" txtUserId.SetFocus ElseIf txtPassword.Text = "" Then MsgBox "Please Enter the Password" txtPassword.SetFocus ElseIf cmbUserType.Text = "" Then MsgBox "Please Select the User Type" cmbUserType.SetFocus Else dataLogin.Recordset.MoveFirst While (Not dataLogin.Recordset.EOF)

39

If LCase(txtUserId.Text) = LCase(dataLogin.Recordset(1).Value) And LCase(txtPassword.Text) = LCase(dataLogin.Recordset(2).Value) And cmbUserType.Text = dataLogin.Recordset(3).Value Then IsValidUser = True End If dataLogin.Recordset.MoveNext Wend If IsValidUser = True Then If cmbUserType.Text = "Admin" Then frmMainFormAdmin.Show ElseIf cmbUserType.Text = "Staff" Then frmMainFormStaff.Show ElseIf cmbUserType.Text = "Student" Then FrmMainFormStudent.Show End If Me.Hide Else MsgBox "Invalid User" txtUserId.SetFocus End If End If End Sub
40

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then End End If End Sub Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbUserType.SetFocus End If End Sub Private Sub txtUserId_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPassword.SetFocus End If End Sub Main Form Admin Private Sub CmdAdmission_Click() Me.Hide FrmAdmissioninfo.Show End Sub Private Sub CmdAttendance_Click()

41

Me.Hide frmAttendanceinfo.Show End Sub Private Sub CmdBack_Click() Me.Hide frmlogin.Show End Sub Private Sub CmdFees_Click() Me.Hide frmFeesinfo.Show End Sub Private Sub CmdMark_Click() Me.Hide frmMarkinfo.Show End Sub Private Sub CmdReceipt_Click() Me.Hide frmReceiptinfo.Show End Sub Private Sub CmdStaff_Click() Me.Hide

42

frmStaffinfo.Show End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("are sure to close?", vbYesNo, "admin") = vbYes Then Unload Me End If End If End Sub Admission Info Private Sub CmdBack_Click() FrmAdmissioninfo.Hide frmMainFormAdmin.Show End Sub Private Sub CmdClear_Click() txtAdmissionid.Text = "" txtName.Text = "" txtRegno.Text = "" txtDob.Text = "" txtGender.Text = "" txtdoj.Text = ""

43

txtFm.Text = "" txtMother.Text = "" txtAddress.Text = "" txtPhoneno.Text = "" txtRn.Text = "" txtBloodgroup.Text = "" txtJos.Text = "" txtCurrentstd.Text = "" txtPreviousschool.Text = "" txtPtcno.Text = "" txtStatus.Text = "" txtName.SetFocus End Sub Private Sub cmdDelete_Click() If MsgBox("Are you sure to Delete this Record?", vbYesNo) = vbYes Then If DataAdmission.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataAdminssion.Recordset.MoveFirst Do While Not DataAdmission.Recordset.EOF If Admissionid.Text = DataAdmission.Recordset(0).Value Then

44

DataAdmission.Recordset.Delete MsgBox "Delted" Exit Do End If DataAdmission.Recordset.MoveNext Loop End If End If End Sub Private Sub CmdNew_Click() txtAdmissionid.Text = DataAdmission.Recordset.RecordCount + 1 txtName.Text = "" txtRegno.Text = "" txtRoll.Text = "" txtDob.Text = "" OptFemale.Value = False OptMale.Value = False txtdoj.Text = "" txtFm.Text = "" txtMother.Text = "" txtAddress.Text = ""

45

txtPhoneno.Text = "" txtRn.Text = "" txtBloodgroup.Text = "" txtJos.Text = "" txtCurrentstd.Text = "" txtPreviousschool.Text = "" txtPtcno.Text = "" txtStatus.Text = "" txtName.SetFocus End Sub Private Sub cmdSave_Click() If txtName.Text = "" Then MsgBox "please enter your name" txtName.SetFocus ElseIf txtRegno.Text = "" Then MsgBox "please enter your regno" txtRegno.SetFocus ElseIf txtAddress.Text = "" Then MsgBox "please enter your address" txtAddress.SetFocus ElseIf txtPhoneno.Text = "" Then

46

MsgBox "please enter your phonenno" txtPhoneno.SetFocus ElseIf txtFm.Text = "" Then MsgBox "please enter your fathername" txtFm.SetFocus Else Dim IsExistRec As Boolean IsExistRec = False If DataAdmission.Recordset.RecordCount > 0 Then DataAdmission.Recordset.MoveFirst End If Do While Not DataAdmission.Recordset.EOF If txtAdmissionid.Text = DataAdmission.Recordset(0).Value Then IsExistRec = True Exit Do End If DataAdmission.Recordset.MoveNext Loop If IsExistRec = True Then DataAdmission.Recordset.Edit Else

47

DataAdmission.Recordset.AddNew End If DataAdmission.Recordset(0) = txtAdmissionid.Text DataAdmission.Recordset(1) = txtName.Text DataAdmission.Recordset(2) = txtRegno.Text DataAdmission.Recordset(3) = txtDob.Text If OptMale.Value = True Then DataAdmission.Recordset(4) = "Male" Else DataAdmission.Recordset(4) = "Female" End If DataAdmission.Recordset(5) = txtdoj.Text DataAdmission.Recordset(6) = txtFm.Text DataAdmission.Recordset(7) = txtMother.Text DataAdmission.Recordset(8) = txtAddress.Text DataAdmission.Recordset(9) = txtPhoneno.Text DataAdmission.Recordset(10) = txtRn.Text DataAdmission.Recordset(11) = txtBloodgroup.Text DataAdmission.Recordset(12) = txtJos.Text DataAdmission.Recordset(13) = txtCurrentstd.Text DataAdmission.Recordset(14) = txtPreviousschool.Text

48

DataAdmission.Recordset(15) = txtPtcno.Text DataAdmission.Recordset(16) = txtStatus.Text DataAdmission.Recordset(17) = txtRoll.Text DataAdmission.Recordset.Update MsgBox "Saved" End If End Sub Private Sub CmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataAdmission.Recordset.RecordCount > 0 Then DataAdmission.Recordset.MoveFirst End If Do While Not DataAdmission.Recordset.EOF If LCase(txtSearch.Text) = LCase(DataAdmission.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataAdmission.Recordset.MoveNext Loop If IsExistRec = True Then

49

txtAdmissionid.Text = DataAdmission.Recordset(0) txtName.Text = DataAdmission.Recordset(1) txtRegno.Text = DataAdmission.Recordset(2) txtDob.Text = DataAdmission.Recordset(3) If DataAdmission.Recordset(4) = "Male" Then OptMale.Value = True OptFemale.Value = False Else OptMale.Value = False OptFemale.Value = True End If txtdoj.Text = DataAdmission.Recordset(5) txtFm.Text = DataAdmission.Recordset(6) txtMother.Text = DataAdmission.Recordset(7) txtAddress.Text = DataAdmission.Recordset(8) txtPhoneno.Text = DataAdmission.Recordset(9) txtRn.Text = DataAdmission.Recordset(10) txtBloodgroup.Text = DataAdmission.Recordset(11) txtJos.Text = DataAdmission.Recordset(12) txtCurrentstd.Text = DataAdmission.Recordset(13) txtPreviousschool.Text = DataAdmission.Recordset(14)

50

txtPtcno.Text = DataAdmission.Recordset(15) txtStatus.Text = DataAdmission.Recordset(16) txtRoll.Text = DataAdmission.Recordset(17) Else MsgBox "Record not found" End If End Sub Private Sub cmdView_Click() rptAdmission.Show End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Are you sure to close?", vbYesNo, "admission") = vbYes Then Unload Me End If End If End Sub Private Sub txtAddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPhoneno.SetFocus End If

51

End Sub Private Sub txtAdmissionid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtName.SetFocus End If End Sub Private Sub txtBloodgroup_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtJos.SetFocus End If End Sub Private Sub txtCurrentstd_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPtcno.SetFocus End If End Sub Private Sub txtDob_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtGender.SetFocus End If End Sub

52

Private Sub txtdoj_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtFm.SetFocus End If End Sub Private Sub txtFm_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtMother.SetFocus End If End Sub Private Sub txtGender_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtdoj.SetFocus End If End Sub Private Sub txtJos_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtCurrentstd.SetFocus End If End Sub Private Sub txtMother_KeyDown(KeyCode As Integer, Shift As Integer)

53

If KeyCode = 13 Then txtAddress.SetFocus End If End Sub Private Sub txtName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtRegno.SetFocus End If End Sub Private Sub txtName_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub txtPhoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtRn.SetFocus End If End Sub Private Sub txtPhoneno_KeyPress(KeyAscii As Integer)

54

If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub txtPreviousschool_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtBloodgroup.SetFocus End If End Sub Private Sub txtPtcno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtStatus.SetFocus End If End Sub Private Sub txtRegno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtDob.SetFocus End If End Sub

55

Private Sub txtRn_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPreviousschool.SetFocus End If End Sub Private Sub txtStatus_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmdSave.SetFocus End If End Sub Attendance Info Private Sub CmbSearchRegno_GotFocus() If DataAdmission.Recordset.RecordCount > 0 Then DataAdmission.Recordset.MoveFirst End If cmbSearchRegNo.Clear Do While Not DataAdmission.Recordset.EOF If cmbSearchStd.Text = DataAdmission.Recordset(13).Value Then cmbSearchRegNo.AddItem (DataAdmission.Recordset(2).Value) End If DataAdmission.Recordset.MoveNext

56

Loop End Sub Private Sub CmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataAttendance.Recordset.RecordCount > 0 Then DataAttendance.Recordset.MoveFirst End If Do While Not DataAttendance.Recordset.EOF If LCase(txtSearchDate.Text) = LCase(DataAttendance.Recordset(4).Value) And LCase(cmbSearchRegNo.Text) = LCase(DataAttendance.Recordset(2).Value) And LCase(cmbSearchStd.Text) = LCase(DataAttendance.Recordset(3).Value) Then IsExistRec = True Exit Do End If DataAttendance.Recordset.MoveNext Loop If IsExistRec = True Then 'txtAttendanceid.Text = DataAttendance.Recordset(0) txtName.Text = DataAttendance.Recordset(1) txtRegno.Text = DataAttendance.Recordset(2) txtStd.Text = DataAttendance.Recordset(3)
57

txtDate.Text = DataAttendance.Recordset(4) txtAttendancevalue.Text = DataAttendance.Recordset(5) Else MsgBox "Record not found" End If End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Are sure to close?", vbYesNo, "attendance") = vbYes Then Unload Me End If End If End Sub Receipt Info Private Sub CmbFeesname_Click() data1.RecordSource = "select * from [FeesDetails] where Std='" + cmbStd.Text + "'" data1.Refresh If Not data1.Recordset.EOF Then If CmbFeesname.Text = "I Mid" Then txtFeesamount.Text = data1.Recordset(1).Value ElseIf CmbFeesname.Text = "II Mid" Then txtFeesamount.Text = data1.Recordset(2).Value ElseIf CmbFeesname.Text = "III Mid" Then txtFeesamount.Text = data1.Recordset(3).Value ElseIf CmbFeesname.Text = "FullTerm" Then txtFeesamount.Text = data1.Recordset(4).Value End If End If
58

End Sub Private Sub CmbFeesname_GotFocus() ' ' ' ' ' ' ' ' ' ' ' ' ' '

data1.RecordSource = "select [FeesName] from [FessInfo]" data1.Refresh

If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst End If CmbFeesname.Clear Do While Not data1.Recordset.EOF CmbFeesname.AddItem (data1.Recordset(0).Value) data1.Recordset.MoveNext Loop

End Sub Private Sub cmbRegno_Click() data1.RecordSource = "select [Name] from [Admissioninfo] where Currentstd='" + cmbStd.Text + "' and RegNo=" + cmbRegNo.Text data1.Refresh txtName.Text = "" If Not data1.Recordset.EOF Then txtName.Text = data1.Recordset(0).Value End If End Sub Private Sub cmbRegno_GotFocus() If DataAdmission.Recordset.RecordCount > 0 Then DataAdmission.Recordset.MoveFirst End If cmbRegNo.Clear Do While Not DataAdmission.Recordset.EOF If cmbStd.Text = DataAdmission.Recordset(13).Value Then cmbRegNo.AddItem (DataAdmission.Recordset(2).Value) End If DataAdmission.Recordset.MoveNext Loop
59

End Sub Private Sub CmbSearchRegno_GotFocus() If DataAdmission.Recordset.RecordCount > 0 Then DataAdmission.Recordset.MoveFirst End If CmbSearchRegno.Clear Do While Not DataAdmission.Recordset.EOF If CmbSearchStd.Text = DataAdmission.Recordset(13).Value Then CmbSearchRegno.AddItem (DataAdmission.Recordset(2).Value) End If DataAdmission.Recordset.MoveNext Loop End Sub

Private Sub CmdBack_Click() If MsgBox("msg if you want to close ", vbYesNo) = vbYes Then Me.Hide frmMainFormAdmin.Show End If End Sub Private Sub CmdClear_Click() txtReceiptid.Text = "" txtName.Text = "" cmbRegNo.Text = "" cmbStd.Text = "" txtRDate.Text = "" CmbFeesname.Text = "" txtFeesamount.Text = "" txtName.SetFocus End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataReceipt.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataReceipt.Recordset.MoveFirst Do While Not DataReceipt.Recordset.EOF If txtReceiptid.Text = DataReceipt.Recordset(0).Value Then DataReceipt.Recordset.Delete MsgBox "Delted"
60

Exit Do End If DataReceipt.Recordset.MoveNext Loop End If End If End Sub Private Sub CmdFeesamt_Change() txtFeesamount.Text = 0 data1.RecordSource = "select Feesamt from FessInfo where FeesName='" + CmdFeesamt.Text + "'" data1.Refresh If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst txtFeesamount.Text = Val(data1.Recordset(0).Value) + 1 End If End Sub Private Sub CmdFeesamt_GotFocus() CmdFeesamt.Clear data1.RecordSource = "select Feesname from FessInfo " data1.Refresh If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst End If Do While Not data1.Recordset.EOF CmdFeesamt.AddItem data1.Recordset(0).Value data1.Recordset.MoveNext Loop End Sub Private Sub CmdNew_Click() txtReceiptid.Text = DataReceipt.Recordset.RecordCount + 1 txtName.Text = "" cmbRegNo.Text = "" cmbStd.Text = "" txtRDate.Text = Now CmbFeesname.Text = "" txtFeesamount.Text = "" txtName.SetFocus End Sub
61

Private Sub cmdSave_Click() Dim IsExistRec As Boolean IsExistRec = False If DataReceipt.Recordset.RecordCount > 0 Then DataReceipt.Recordset.MoveFirst End If Do While Not DataReceipt.Recordset.EOF If txtReceiptid.Text = DataReceipt.Recordset(0).Value Then IsExistRec = True Exit Do End If DataReceipt.Recordset.MoveNext Loop If IsExistRec = True Then DataReceipt.Recordset.Edit Else DataReceipt.Recordset.AddNew End If DataReceipt.Recordset(0) = Val(txtReceiptid.Text) DataReceipt.Recordset(1) = txtName.Text DataReceipt.Recordset(2) = cmbRegNo.Text DataReceipt.Recordset(3) = cmbStd.Text DataReceipt.Recordset(4) = txtRDate.Text DataReceipt.Recordset(5) = CmbFeesname.Text DataReceipt.Recordset(6) = txtFeesamount.Text DataReceipt.Recordset.Update MsgBox "Saved" txtReceiptid.Text = "" txtName.Text = "" cmbRegNo.Text = "" cmbStd.Text = "" txtRDate.Text = "" CmbFeesname.Text = "" txtFeesamount.Text = "" End Sub Private Sub CmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False
62

If DataReceipt.Recordset.RecordCount > 0 Then DataReceipt.Recordset.MoveFirst End If Do While Not DataReceipt.Recordset.EOF If LCase(txtsearchdate.Text) = LCase(DataReceipt.Recordset(4).Value) And LCase(CmbSearchRegno.Text) = LCase(DataReceipt.Recordset(2).Value) And LCase(CmbSearchStd.Text) = LCase(DataReceipt.Recordset(3).Value) Then IsExistRec = True Exit Do End If DataReceipt.Recordset.MoveNext Loop If IsExistRec = True Then txtReceiptid.Text = DataReceipt.Recordset(0) txtName.Text = DataReceipt.Recordset(1) cmbRegNo.Text = DataReceipt.Recordset(2) cmbStd.Text = DataReceipt.Recordset(3) txtRDate.Text = DataReceipt.Recordset(4) CmbFeesname.Text = DataReceipt.Recordset(5) txtFeesamount.Text = DataReceipt.Recordset(6) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptReceipt.Show End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("are sure to close?", vbYesNo, "receipt") = vbYes Then Unload Me End If End If End Sub
63

Private Sub txtFeesamount_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmdSave.SetFocus End If End Sub Private Sub CmbFeesname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtFeesamount.SetFocus End If End Sub Private Sub txtName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbRegNo.SetFocus End If End Sub Private Sub txtName_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub txtRDate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbFeesname.SetFocus End If End Sub Private Sub txtReceiptid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtName.SetFocus End If End Sub Private Sub CmbRegno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbStd.SetFocus End If End Sub Private Sub CmbStd_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then
64

txtRDate.SetFocus End If End Sub Staff Info Private Sub CmdBack_Click() If MsgBox("msg if you want to close ", vbYesNo) = vbYes Then frmStaffinfo.Hide frmMainFormAdmin.Show End If End Sub

Private Sub CmdClear_Click() txtStaffid.Text = "" txtName.Text = "" txtDob.Text = "" txtPhoneno.Text = "" txtAddress.Text = "" txtdoj.Text = "" OptMale.Value = False OptFemale.Value = False txtfh.Text = "" CmbMartial.Text = "" txtQualification.Text = "" CmbHandlingsub.Text = "" Cmbhandlingsub2.Text = "" Cmbhandlingsub3.Text = "" CmbHandlingclass.Text = "" Cmbhandlingclass2.Text = "" Cmbhandlingclass3.Text = "" txtMailid.Text = "" CmbBlood.Text = "" txtExperiance.Text = "" txtStatus.Text = "" CmbStype.Text = "" txtRollname.Text = "" txtName.SetFocus End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then
65

If DataStaff.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataStaff.Recordset.MoveFirst Do While Not DataStaff.Recordset.EOF If txtStaffid.Text = DataStaff.Recordset(0).Value Then DataStaff.Recordset.Delete MsgBox "Delted" Exit Do End If DataStaff.Recordset.MoveNext Loop End If End If End Sub Private Sub CmdNew_Click() txtStaffid.Text = DataStaff.Recordset.RecordCount + 1 txtName.Text = "" txtDob.Text = "" txtPhoneno.Text = "" txtAddress.Text = "" txtdoj.Text = Now OptFemale.Value = False OptMale.Value = False CmbMartial.Text = "" txtfh.Text = "" txtQualification.Text = "" CmbHandlingsub.Text = "" Cmbhandlingsub2.Text = "" Cmbhandlingsub3.Text = "" CmbHandlingclass.Text = "" Cmbhandlingclass2.Text = "" Cmbhandlingclass3.Text = "" txtMailid.Text = "" CmbBlood.Text = "" txtExperiance.Text = "" txtpvschool.Text = "" txtStatus.Text = "" CmbStype.Text = "" txtRollname.Text = "" txtName.SetFocus End Sub Private Sub cmdSave_Click() Dim IsExistRec As Boolean
66

IsExistRec = False If DataStaff.Recordset.RecordCount > 0 Then DataStaff.Recordset.MoveFirst End If Do While Not DataStaff.Recordset.EOF If txtStaffid.Text = DataStaff.Recordset(0).Value Then IsExistRec = True Exit Do End If DataStaff.Recordset.MoveNext Loop If IsExistRec = True Then DataStaff.Recordset.Edit Else DataStaff.Recordset.AddNew End If DataStaff.Recordset(0) = txtStaffid.Text DataStaff.Recordset(1) = txtName.Text DataStaff.Recordset(2) = txtDob.Text DataStaff.Recordset(3) = txtPhoneno.Text DataStaff.Recordset(4) = txtAddress.Text DataStaff.Recordset(5) = txtdoj.Text If OptMale.Value = True Then DataStaff.Recordset(6) = "Male" Else DataStaff.Recordset(6) = "Female" End If DataStaff.Recordset(7) = txtfh.Text DataStaff.Recordset(8) = CmbMartial.Text DataStaff.Recordset(9) = txtQualification.Text DataStaff.Recordset(10) = CmbHandlingsub.Text DataStaff.Recordset(11) = CmbHandlingclass.Text DataStaff.Recordset(12) = txtMailid.Text DataStaff.Recordset(13) = CmbBlood.Text DataStaff.Recordset(14) = txtExperiance.Text DataStaff.Recordset(15) = txtStatus.Text DataStaff.Recordset(16) = CmbStype.Text DataStaff.Recordset(17) = txtRollname.Text DataStaff.Recordset(18) = txtpvschool.Text DataStaff.Recordset(19) = Cmbhandlingsubj2.Text DataStaff.Recordset(20) = Cmbhandlinsubj3.Text DataStaff.Recordset(21) = Cmbhandlingclass2.Text
67

DataStaff.Recordset(22) = Cmbhandlingclass3.Text DataStaff.Recordset.Update MsgBox "Saved" txtStaffid.Text = "" txtName.Text = "" txtDob.Text = "" txtPhoneno.Text = "" txtAddress.Text = "" txtdoj.Text = "" OptMale.Value = False OptFemale.Value = False txtfh.Text = "" CmbMartial.Text = "" txtQualification.Text = "" CmbHandlingsub.Text = "" Cmbhandlingsub2.Text = "" Cmbhandlinsub3.Text = "" CmbHandlingclass.Text = "" Cmbhandlingclass2.Text = "" Cmbhandlingclass3.Text = "" txtMailid.Text = "" CmbBlood.Text = "" txtExperiance.Text = "" txtpvschool.Text = "" txtStatus.Text = "" CmbStype.Text = "" txtRollname.Text = "" End Sub Private Sub CmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataStaff.Recordset.RecordCount > 0 Then DataStaff.Recordset.MoveFirst End If Do While Not DataStaff.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataStaff.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataStaff.Recordset.MoveNext
68

Loop If IsExistRec = True Then txtStaffid.Text = DataStaff.Recordset(0) txtName.Text = DataStaff.Recordset(1) txtDob.Text = DataStaff.Recordset(2) txtPhoneno.Text = DataStaff.Recordset(3) txtAddress.Text = DataStaff.Recordset(4) txtdoj.Text = DataStaff.Recordset(5) If DataAdmission.Recordset(6) = "Male" Then OptMale.Value = True OptFemale.Value = False Else OptMale.Value = False OptFemale.Value = True End If txtfh.Text = DataStaff.Recordset(7) CmbMartial.Text = DataStaff.Recordset(8) txtQualification.Text = DataStaff.Recordset(9) CmbHandlingsub.Text = DataStaff.Recordset(10) CmbHandlingclass.Text = DataStaff.Recordset(11) txtMailid.Text = DataStaff.Recordset(12) CmbBlood.Text = DataStaff.Recordset(13) txtExperiance.Text = DataStaff.Recordset(14) txtStatus.Text = DataStaff.Recordset(15) CmbStype.Text = DataStaff.Recordset(16) txtRollname.Text = DataStaff.Recordset(17) txtpvschool.Text = DataStaff.Recordset(18) Cmbhandlingsubj2.Text = DataStaff.Recordset(19) Cmbhandlinsubj3.Text = DataStaff.Recordset(20) Cmbhandlingclass2.Text = DataStaff.Recordset(21) Cmbhandlingclass3.Text = DataStaff.Recordset(22) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptStaff.Show End Sub

69

Private Sub Form_Activate() If DataStaff.Recordset.RecordCount > 0 Then DataStaff.Recordset.MoveFirst End If cmbSearch.Clear Do While Not DataStaff.Recordset.EOF cmbSearch.AddItem (DataStaff.Recordset(1).Value) DataStaff.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("are sure to close?", vbYesNo, "attendance") = vbYes Then Unload Me End If End If End Sub Private Sub txtAddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtdoj.SetFocus End If End Sub Private Sub CmbBlood_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtExperiance.SetFocus End If End Sub Private Sub txtDob_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPhoneno.SetFocus End If End Sub Private Sub txtdoj_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtGender.SetFocus End If End Sub
70

Private Sub txtExperiance_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtStatus.SetFocus End If End Sub Private Sub txtfh_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbMartial.SetFocus End If End Sub Private Sub txtGender_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtfh.SetFocus End If End Sub Private Sub CmbHandlingclass_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtMailid.SetFocus End If End Sub Private Sub CmbHandlingsub_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbHandlingclass.SetFocus End If End Sub Private Sub txtMailid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbBlood.SetFocus End If End Sub Private Sub CmbMartial_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtQualification.SetFocus End If End Sub Private Sub txtName_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtDob.SetFocus
71

End If End Sub Private Sub txtName_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then End If End Sub Private Sub txtPhoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtAddress.SetFocus End If End Sub Private Sub txtPhoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or (KeyAscii >= Asc("a") And KeyAscii <= Asc("z"))) Then End If End Sub Private Sub txtQualification_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbHandlingsub.SetFocus End If End Sub Private Sub txtRollname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmdSave.SetFocus End If End Sub Private Sub txtStaffid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtName.SetFocus End If End Sub Private Sub txtStatus_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then CmbStype.SetFocus End If End Sub Private Sub CmbStype_KeyDown(KeyCode As Integer, Shift As Integer)
72

If KeyCode = 13 Then txtRollname.SetFocus End If End Sub Mark Info Dim TotalIndex As Integer Private Sub cmbRegno_Click() Dim i As Integer

data1.RecordSource = "select [Name] from [Admissioninfo] where Currentstd='" + cmbStd.Text + "' and RegNo=" + cmbRegNo.Text data1.Refresh If Not data1.Recordset.EOF Then txtName.Text = data1.Recordset(0).Value End If data1.RecordSource = "select * from [MarkDetails] where StdSec='" + cmbStd.Text + "' and RegNo='" + cmbRegNo.Text + "'" data1.Refresh If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst txtMidI(0).Text = data1.Recordset(2).Value txtMidI(1).Text = data1.Recordset(3).Value txtMidI(2).Text = data1.Recordset(4).Value txtMidI(3).Text = data1.Recordset(5).Value txtMidI(4).Text = data1.Recordset(6).Value txtMidI(5).Text = data1.Recordset(7).Value txtQua(0).Text = data1.Recordset(8).Value txtQua(1).Text = data1.Recordset(9).Value txtQua(2).Text = data1.Recordset(10).Value txtQua(3).Text = data1.Recordset(11).Value txtQua(4).Text = data1.Recordset(12).Value txtQua(5).Text = data1.Recordset(13).Value txtMidII(0).Text = data1.Recordset(14).Value txtMidII(1).Text = data1.Recordset(15).Value txtMidII(2).Text = data1.Recordset(16).Value txtMidII(3).Text = data1.Recordset(17).Value
73

txtMidII(4).Text = data1.Recordset(18).Value txtMidII(5).Text = data1.Recordset(19).Value txtHalf(0).Text = data1.Recordset(20).Value txtHalf(1).Text = data1.Recordset(21).Value txtHalf(2).Text = data1.Recordset(22).Value txtHalf(3).Text = data1.Recordset(23).Value txtHalf(4).Text = data1.Recordset(24).Value txtHalf(5).Text = data1.Recordset(25).Value txtMidIII(0).Text = data1.Recordset(26).Value txtMidIII(1).Text = data1.Recordset(27).Value txtMidIII(2).Text = data1.Recordset(28).Value txtMidIII(3).Text = data1.Recordset(29).Value txtMidIII(4).Text = data1.Recordset(30).Value txtMidIII(5).Text = data1.Recordset(31).Value txtAnu(0).Text = data1.Recordset(32).Value txtAnu(1).Text = data1.Recordset(33).Value txtAnu(2).Text = data1.Recordset(34).Value txtAnu(3).Text = data1.Recordset(35).Value txtAnu(4).Text = data1.Recordset(36).Value txtAnu(5).Text = data1.Recordset(37).Value Else For i = 0 To 6 txtMidI(i).Text = "" txtMidII(i).Text = "" txtMidIII(i).Text = "" txtQua(i).Text = "" txtHalf(i).Text = "" txtAnu(i).Text = "" Next End If For i = 0 To 6 If Val(txtMidI(i).Text) = 0 Then txtMidI(i).Text = "" If Val(txtMidII(i).Text) = 0 Then txtMidII(i).Text = "" If Val(txtMidIII(i).Text) = 0 Then txtMidIII(i).Text = "" If Val(txtQua(i).Text) = 0 Then txtQua(i).Text = "" If Val(txtHalf(i).Text) = 0 Then txtHalf(i).Text = "" If Val(txtAnu(i).Text) = 0 Then txtAnu(i).Text = "" Next End Sub
74

Private Sub cmbStd_Click() data1.RecordSource = "select [Subjectname] from [Subjectinfo] where Stdsec='" + cmbStd.Text + "' order by subjectId" data1.Refresh Dim i As Integer For i = 0 To 6 lblSubject(i).Visible = False txtMidI(i).Visible = False txtMidII(i).Visible = False txtMidIII(i).Visible = False txtQua(i).Visible = False txtHalf(i).Visible = False txtAnu(i).Visible = False Next If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst End If

i=0 While Not data1.Recordset.EOF lblSubject(i).Visible = True txtMidI(i).Visible = True txtMidII(i).Visible = True txtMidIII(i).Visible = True txtQua(i).Visible = True txtHalf(i).Visible = True txtAnu(i).Visible = True lblSubject(i).Caption = data1.Recordset(0).Value txtMidI(i).Text = "" txtMidII(i).Text = "" txtMidIII(i).Text = "" txtQua(i).Text = "" txtHalf(i).Text = "" txtAnu(i).Text = "" i=i+1 data1.Recordset.MoveNext Wend lblSubject(i).Visible = True txtMidI(i).Visible = True
75

txtMidII(i).Visible = True txtMidIII(i).Visible = True txtQua(i).Visible = True txtHalf(i).Visible = True txtAnu(i).Visible = True lblSubject(i).Caption = "Total" TotalIndex = i data1.RecordSource = "select [Regno] from [Admissioninfo] where Currentstd='" + cmbStd.Text + "' order by Regno" data1.Refresh cmbRegNo.Clear If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst End If While Not data1.Recordset.EOF cmbRegNo.AddItem data1.Recordset(0).Value data1.Recordset.MoveNext Wend End Sub Private Sub CmdBack_Click() If MsgBox("Are you close this Form?", vbYesNo) = vbYes Then Unload Me frmMainFormAdmin.Show End If End Sub Private Sub CmdClear_Click() Dim i As Integer For i = 0 To 6 txtMidI(i).Text = "" txtMidII(i).Text = "" txtMidIII(i).Text = "" txtQua(i).Text = "" txtHalf(i).Text = "" txtAnu(i).Text = "" Next

76

End Sub Private Sub cmdSave_Click() data1.RecordSource = "select * from [MarkDetails] where StdSec='" + cmbStd.Text + "' and RegNo='" + cmbRegNo.Text + "'" data1.Refresh

If Not data1.Recordset.EOF Then data1.Recordset.MoveFirst data1.Recordset.Edit Else data1.Recordset.AddNew End If data1.Recordset(0).Value = cmbRegNo.Text data1.Recordset(1).Value = cmbStd.Text data1.Recordset(2).Value = Val(txtMidI(0).Text) data1.Recordset(3).Value = Val(txtMidI(1).Text) data1.Recordset(4).Value = Val(txtMidI(2).Text) data1.Recordset(5).Value = Val(txtMidI(3).Text) data1.Recordset(6).Value = Val(txtMidI(4).Text) data1.Recordset(7).Value = Val(txtMidI(5).Text) data1.Recordset(8).Value = Val(txtQua(0).Text) data1.Recordset(9).Value = Val(txtQua(1).Text) data1.Recordset(10).Value = Val(txtQua(2).Text) data1.Recordset(11).Value = Val(txtQua(3).Text) data1.Recordset(12).Value = Val(txtQua(4).Text) data1.Recordset(13).Value = Val(txtQua(5).Text) data1.Recordset(14).Value = Val(txtMidII(0).Text) data1.Recordset(15).Value = Val(txtMidII(1).Text) data1.Recordset(16).Value = Val(txtMidII(2).Text) data1.Recordset(17).Value = Val(txtMidII(3).Text) data1.Recordset(18).Value = Val(txtMidII(4).Text) data1.Recordset(19).Value = Val(txtMidII(5).Text) data1.Recordset(20).Value = Val(txtHalf(0).Text) data1.Recordset(21).Value = Val(txtHalf(1).Text) data1.Recordset(22).Value = Val(txtHalf(2).Text) data1.Recordset(23).Value = Val(txtHalf(3).Text) data1.Recordset(24).Value = Val(txtHalf(4).Text) data1.Recordset(25).Value = Val(txtHalf(5).Text) data1.Recordset(26).Value = Val(txtMidIII(0).Text) data1.Recordset(27).Value = Val(txtMidIII(1).Text)
77

data1.Recordset(28).Value = Val(txtMidIII(2).Text) data1.Recordset(29).Value = Val(txtMidIII(3).Text) data1.Recordset(30).Value = Val(txtMidIII(4).Text) data1.Recordset(31).Value = Val(txtMidIII(5).Text) data1.Recordset(32).Value = Val(txtAnu(0).Text) data1.Recordset(33).Value = Val(txtAnu(1).Text) data1.Recordset(34).Value = Val(txtAnu(2).Text) data1.Recordset(35).Value = Val(txtAnu(3).Text) data1.Recordset(36).Value = Val(txtAnu(4).Text) data1.Recordset(37).Value = Val(txtAnu(5).Text) data1.Recordset.Update MsgBox "Saved" End Sub Private Sub txtAnu_Change(Index As Integer) Dim tot, i As Integer tot = 0 For i = 0 To TotalIndex - 1 tot = tot + Val(txtAnu(i).Text) Next txtAnu(TotalIndex).Text = tot If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtAnu(Index).Text) < 70 Then txtAnu(Index).ForeColor = vbRed Else txtAnu(Index).ForeColor = vbGreen End If Else If Val(txtAnu(Index).Text) < 35 Then txtAnu(Index).ForeColor = vbRed Else txtAnu(Index).ForeColor = vbGreen End If End If End Sub Private Sub txtHalf_Change(Index As Integer) Dim tot, i As Integer tot = 0 For i = 0 To TotalIndex - 1 tot = tot + Val(txtHalf(i).Text) Next
78

txtHalf(TotalIndex).Text = tot If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtHalf(Index).Text) < 70 Then txtHalf(Index).ForeColor = vbRed Else txtHalf(Index).ForeColor = vbGreen End If Else If Val(txtHalf(Index).Text) < 35 Then txtHalf(Index).ForeColor = vbRed Else txtHalf(Index).ForeColor = vbGreen End If End If

End Sub Private Sub txtMidI_Change(Index As Integer) Dim tot, i As Integer tot = 0 For i = 0 To TotalIndex - 1 tot = tot + Val(txtMidI(i).Text) Next txtMidI(TotalIndex).Text = tot If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtMidI(Index).Text) < 70 Then txtMidI(Index).ForeColor = vbRed Else txtMidI(Index).ForeColor = vbGreen End If Else If Val(txtMidI(Index).Text) < 35 Then txtMidI(Index).ForeColor = vbRed Else txtMidI(Index).ForeColor = vbGreen End If End If

End Sub Private Sub txtMidII_Change(Index As Integer) Dim tot, i As Integer tot = 0
79

For i = 0 To TotalIndex - 1 tot = tot + Val(txtMidII(i).Text) Next txtMidII(TotalIndex).Text = tot If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtMidII(Index).Text) < 70 Then txtMidII(Index).ForeColor = vbRed Else txtMidII(Index).ForeColor = vbGreen End If Else If Val(txtMidII(Index).Text) < 35 Then txtQua(Index).ForeColor = vbRed Else txtMidII(Index).ForeColor = vbGreen End If End If End Sub Private Sub txtMidIII_Change(Index As Integer) Dim tot, i As Integer tot = 0 For i = 0 To TotalIndex - 1 tot = tot + Val(txtMidIII(i).Text) Next

If tot = 0 Then txtMidIII(TotalIndex).Text = "" Else txtMidIII(TotalIndex).Text = tot End If If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtMidIII(Index).Text) < 70 Then txtMidIII(Index).ForeColor = vbRed Else txtMidIII(Index).ForeColor = vbGreen End If Else If Val(txtMidIII(Index).Text) < 35 Then txtMidIII(Index).ForeColor = vbRed Else txtMidIII(Index).ForeColor = vbGreen End If
80

End If End Sub Private Sub txtQua_Change(Index As Integer) Dim tot, i As Integer tot = 0 For i = 0 To TotalIndex - 1 tot = tot + Val(txtQua(i).Text) Next If tot = 0 Then txtQua(TotalIndex).Text = "" Else txtQua(TotalIndex).Text = tot End If If cmbStd.Text = "XIIA" Or cmbStd.Text = "XIIB" Then If Val(txtQua(Index).Text) < 70 Then txtQua(Index).ForeColor = vbRed Else txtQua(Index).ForeColor = vbGreen End If Else If Val(txtQua(Index).Text) < 35 Then txtQua(Index).ForeColor = vbRed Else txtQua(Index).ForeColor = vbGreen End If End If End Sub

81

Anda mungkin juga menyukai