computerization of the hostel department-final report

Upload: jef-wanyeki

Post on 05-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Computerization of the Hostel Department-final Report

    1/113

    CHAPTER ONE

    1.0 INTRODUCTION

    1.1 Background of study

    A hostel as described in oxford dictionary is a large house with multiple rooms where

    people can stay. Quite a good number of academic institutions offer boarding facilities

    to its students. Consequently, accommodation department of the aforementioned

    institutions are entitled with a task of keeping the details of each and every student who

    has been offered accommodation by use of any appropriate means. However, the need

    for coming up with a system that facilitates a fast storage, processing and retrieval ofinformation is almost inevitable more so when dealing with large amounts of data. This

    does not only help in reducing the workload involved with handling of data but also

    ensures that co-coordinated results are yielded.

    With the current trend in the changes in IT, computerization of departments in many

    organizations has always been the wish of every manager. This has been bolstered with

    the fact that, the idea of storing electronic files has had an affirmative impact on office

    work by almost facing out the tedious and time consuming paper lists, thereby ensuring

    organizations get a safe and custody of their data while avoiding big administrative

    costs.

    1.1.2 Statement of Originality

    In Masinde Muliro University, the hostel department to be specific, files to store and

    manage the students records, this system has proved to be time consuming, quite

    expensive, tiresome and is over reliant on paper.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    2/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    3/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    4/113

    the same time.

    Less paper work thus reduced paper work and expenditures in form of

    purchases and storage

    Access restriction to unauthorized persons to access confidential documents.

    This is possible through use of passwords that ensures data security.

    Accuracy of data is provided and in a timely fashion due to its consistency

    unlike on the manual system. This helps in time economy as it saves time.

    1.5 Research Questions

    What are the data integrity and confidentiality constraints posed by themanual hostel management system?

    How efficient is the manual system of booking in students into hostels?

    Is the computerized system projected to increase the speed of hostel data

    processing?

    1.6 Significance of the Study

    The following are the perceived significance of this study:

    o The project shall benefit the college in that it shall provide a means of

    efficiently running the hostel department efficiently at a projected reduced

    cost.

    o The hostel workers shall benefit from the project in that there will be a

    reduced workload associated with paperwork.

    o The student shall benefit in that it is projected that the project shall

    provide a faster room allocation and clearance thereby saving them thelengthy time spent in queues during room allocation and clearance.

    o The project shall enhance data integrity and reduce duplication.

    o The project will also phase out the tedious manual system.

    o It will boost the employees moral due to better processing and operations

  • 8/2/2019 Computerization of the Hostel Department-final Report

    5/113

    o Since all this operation will be electronically handled there will be easy

    report generation and modifying information.

    1.7 Limitations of the project

    The following are anticipated limitations of this project.

    The performance of HMS may be compromised by computer viruses, Trojans ormalwares which may affect the operating system in which the HMS runs on. To

    counter this, the institution shall be expected to bear additional cost of installing

    an antivirus on their computers and update them regularly.

    Its expensive because a lot of cash will be used e.g. The end users of HMS shall

    be expected to undergo some formal training on the general use of computers

    and HMS system so as to acquaint themselves with its operations. This shall call

    for an additional expense on the side of the institution to take care of the training. It will lead to job displacement and/or replacement since the system needs few

    employees (computer literate) to manage the hostel.

    1.8 Scope of the study

    The project covered Masinde Muliro University of Science and Technology. It

    targeted the Accommodation and catering department narrowing down to thehostel department in particular on evaluation of the impact of computerization

    with regards to its administration.

    1.9 Basic Assumptions of the Study

    The following assumptions are made for this study:

  • 8/2/2019 Computerization of the Hostel Department-final Report

    6/113

    That there exist some degree of erroneous data storage and retrieval in the current system.

    That the respondents will give accurate information that will help attain the objectives of

    the study.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    7/113

    1.10 Feasibility of the propose system

    The feasibility of the proposed system centered on the following;

    Technical feasibility

    In technical feasibility study, the technology on ground and the required

    technology for the proposed system were established. The hostel department

    requires hardwares and software. Should also train its staff (to be computer

    literate).

    If the staff will familiarize with the proposed system then the effectiveness and

    efficiency of the hostel will increase rapidly.

    Operational feasibility

    It focused on establishing if the proposed system will be accepted by the

    intended users and management.

    It showed that the staff members will be comfortable with the proposed system

    because it is faster and efficient.

    Economic feasibility

    The study showed that the new system would be of greater benefit to the hostel in that;

    Will consume much less space as compared to the current system.

    Will be much easier to generate reports at a click of a button.

    The proposed system will reduce on errors e.g. miscalculation.

    All this will greatly increase the economic growth of the hostel.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    8/113

    INFORMATION GATHERING

    During the fact finding, I chose on some of the fact finding as follows;

    Questionnaires

    1. The following are reasons to why I chose to use questionnaires during my data

    collection;

    2. Answers are filled in less tense environment and the employee doesnt feel that

    there being summoned by the analyst as compared to interviews.

    3. Since they are filled in privacy, more sincere responses are possible

    Studying available documents

    In this method, I referenced the records used during admission of students in the hostel.

    This formed a good starting point for me to gain an overall insight of the existing

    system.

    Observation

    In this method of data collection, I had the chance to observe how students line up to be

    served by the staff.

    This method gave me first-hand information about the current system and also helped

    me get acquainted with the operational personnel.

    After the data collection process I had the following average results;

  • 8/2/2019 Computerization of the Hostel Department-final Report

    9/113

    CHAPTER TWO

    2.0 Literature Review

    2.1 IntroductionThis chapter discusses the literature related to the objectives and also shows the system

    flowchart.

    For many years in the past, people used to count their properties using sticks which

    were placed in a place as records. Others used their fingers to count and kept no

    records. However the technology had to change with time.

    The use of abacus in the Middle East in early ages as the ancient development in

    counting paved way for more technological developments(Wiley,1991). The worldwitnessed the introduction of logarithm, slide rule then the introduction of binary

    numbers used by one Francis Bacon. The technology did not stop at that as other

    scientists advanced in counting machines such as the Pascaline.

    The introduction of punch cards which was used in weaving formed the basis of

    programmable computer. In 1822 , Charles Babbage, a professor in Mathematics

    developed an inference machine which was developed to general purpose calculator

    which looked slightly as the modern computer Lady Ada who is believed to be the first

    programmer produced programs to be used in this analytical engine.

    Later tabular machine was discovered. This machine had capabilities of detecting data

    stored in forms of punched holes on the cards. Holerinth Company, the computing

    tabulating recording company later became IBM today. In 1900 the magnetic storage

    principles e.g. magnetic tapes was discovered .later thermionic valves was invented be

    Lee De Forest. These valves were useful in electronic logics implementation

    All this past machines were simply calculators for they could only perform

    mathematical tasks alone.

    A computer is an electronic device that is programmed to accept data as its input,

    process data in a given format, store data and gives out meaningful information in a

    timely fashion as its output. This information can be used as date by other processes.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    10/113

    The first computer to be developed was ENIAC though it was sometimes still referred

    as a calculator.

    From the introduction of the first computer, the world has witnessed the development

    of five generation of computers and the programming languages.These are:

    The first generation

    The second

    The third

    The fourth

    And the fifth generation computers

    The first generation computers used the machine language for programming and were

    cumbersome to code.

    However they were extremely big in size and were very expensive to purchase. They

    used thermionic valves to run.

    The second generation were characterized by use of transistors instead on thermionic

    valves as used the in the past generation. They were also considerably big in size

    though bit smaller than the first ones.

    Their operations were generally slower in both generations.

    The third generation witnessed the introduction of IC instead of transistors and then the

    coming of microprocessors in the fourth generation which made the computer to be

    cheaply obtained, faster in operation and allowed multiprogramming whereby a single

    computer can run multiple tasks concurrently.

    Programming language are there to be praised for their recent advancement as we

    venture in the fifth generation computers where they are programmed to perform tasks

    done by only human beings such as direct communication to the computers by verbal

    means in a technology known as artificial intelligence.

    High level programming has made programming more easier than it the low level ones

    which only used ones and zeros. These high level languages resemble English like

    statements and require no background knowledge to program. The best example of this

  • 8/2/2019 Computerization of the Hostel Department-final Report

    11/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    12/113

    2.2 system flowchart

    Hostel Admission

    NOLogin

    success?

    START

    Log in

    YES

    Retr

    ?

    YES

    Enter Students

    Details

    Enter room

    Details

    Update Details

    Allocate room

    Generate Report

    Stop

    NO

    L

    OO

    p

  • 8/2/2019 Computerization of the Hostel Department-final Report

    13/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    14/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    TABLES, FILES AND FORM STRUCTURE DESCRIPTIONAdd students

    Entities of Add students table/form include;

    Fields Data type Description

    Surname text Provides the surname of a student

    First name text Provides the first name of a student

    Other name text Provides other names of a student

    Registration number text Provides the registration number of a student

    Gender text Provides the gender of a student

    Phone number text Provides phone number of a student

    Country text Provides the country of residence of a student

    Hostel block text Provides the hostel block of a student

    Hostel wing text Provides the wing of a student

    Room number number Provides the room number of a student

    Key number number Provides the key number of a studentCourse text Provides the course of a student

    Faculty text Provides the faculty of a student

    Year of study number Provides the year of study of a student

    Semester number Provides the current semester of a student

    Amount paid number Provides the amount paid by a student

    Date Date/time Provides the date of payment

    Outstanding balance Currency Provides the outstanding balance of a student

    Receipt number number Provides the receipt of a student

  • 8/2/2019 Computerization of the Hostel Department-final Report

    15/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    surname

    First Name

    Other names

    Gender

    Phone number

    Country

    Hostel block

    Hostel wing

    Room number

    Key number

    Course

    Faculty

    Year of study

    Semester

    Amount paid

    Date

    Outstanding

    balance

    Receipt number

    Add Student form

  • 8/2/2019 Computerization of the Hostel Department-final Report

    16/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Surname

    First Name

    Other names

    Gender

    Phone number

    Country

    Hostel block

    Hostel wing

    Room number

    Key number

    Course

    Faculty

    Year of study

    Semester

    Amount paid

    Date

    Outstanding

    balance

    Receipt number

    Edit Student form

    Edit students

    Entities of edit students table/form include;

    Fields Data type Description

    Surname text Provides the surname of a student

    First name text Provides the first name of a student

    Other name text Provides other names of a studentRegistration number text Provides the registration number of a student

    Gender text Provides the gender of a student

    Phone number text Provides phone number of a student

    Country text Provides the country of residence of a student

    Hostel block text Provides the hostel block of a student

    Hostel wing text Provides the wing of a student

    Room number number Provides the room number of a student

    Key number number Provides the key number of a student

    Course text Provides the course of a student

    Faculty text Provides the faculty of a student

    Year of study number Provides the year of study of a studentSemester number Provides the current semester of a student

    Amount paid number Provides the amount paid by a student

    Date Date/time Provides the date of payment

    Outstanding balance Currency Provides the outstanding balance of a student

    Receipt number number Provides the receipt of a student

  • 8/2/2019 Computerization of the Hostel Department-final Report

    17/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    MDI screen

    LOG IN

    Entities of Log In table/form include;

    Fields Data type Description

    User name Text Provides the user name to log in

    Password Text Provides the user password to log in

    LOG IN form

    Hostel Management System

    Fil

    Edi

    Administrator View Reports Searc

    Tool

    Help

    User name

    Password

    Log in Form

  • 8/2/2019 Computerization of the Hostel Department-final Report

    18/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    VIEW REPORTS form

    UPDATE FEE

    Entities of edit fee table/form include;

    Fields Data type Description

    Hostel fee Currency Provides the hostel fee to update

    SEARCH

    Registered students

    Hostels Students with balance

    Registered users

    Registered femalesRegistered males

    Close

    U date Hostel Fee

    Enter New Fee

    Clear field u date Exit

    Search for a student

    Re . No

    Search Exit

  • 8/2/2019 Computerization of the Hostel Department-final Report

    19/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    SPLASH SCREEN

    Add HOSTEL

    Edit hostel form

    Edit Hostel

    HOSTEL MANAGEMENT SYSTEM

    MASINDE MULIRO UNIVERSITY OF SCIENCE ANDTECHNOLOGY

    P.O.BOX 190-50100

    KAKAMEGA

    Hostel Name

    Gender

    Hostel Name

    Prefix

    Hostel Nick name

    Gender

  • 8/2/2019 Computerization of the Hostel Department-final Report

    20/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER THREE

    3.0 ANALYSIS

    3.1 Terms of Reference.

    An analysis of the existing hostel administrating system made it necessary to haveterms of reference to help me through the project. These terms of reference are asfollows.

    3.1.1 Problem Definition.

    The need to identify the existence of a problem and the reason for the project was the

    first major role I had to undertake. I carried out a preliminary survey to ascertains the

    need for a better system

    3.1.2 System Investigation

    As part of system investigation, the following techniques were accomplished.

    3.1.2.1 Requirement gathering Gathering of facts about the general system

    and if there is any need for change.

    3.1.2.2 Requirement elicitation This is a very essential assignment after

    requirement gathering since all the information gathered as facts is to be

    used during the design period. One doesnt lose sight of important areas

    of concern.

    3.1.3 Analysis And Review - The review of the facts found and recorded will

    form a major analysis which shall be translated to construct a lasting

    solution for the system.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    21/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    3.1.4 System Design - The key intention here is to help the system user to

    understand how the system will look like and how it will function. A

    model of the system I intend to design and it will consist of the following:3.1.4.1 Input design.

    The model of how data can be entered in the system for the information

    processing is necessary for the whole project.

    3.1.4.2 Process design - This model shows how data can be manipulated to comeup with required information.

    3.1.5 Programming - It is a process of designing codes that when properly

    arranged and coded in a machine, it will integrate other software and

    hardware into a harmonious system.

    3.1.6 Testing - Here the system shall be examined to see the performance of the

    modules, programs and the entire system.

    3.1.7 System documentation - It will include technical manuals and end user

    manuals. It shall comprise of descriptions of the programs and diagrams

    and the entire system usage.

    3.1.8 Implementation, Post Implementation and Review - This will show how

    the system is to be installed maintained and how it can be reviewed for

    further upgrading to meet the users requirements.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    22/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    3.2 feasibility study

    A preliminary study was carried out to look into the possibility of improving the

    existing systems and overcome the necessary problems.

    The study featured economic and social viability necessary to the system development.

    3.2.1 Objectives of Feasibility study.

    a) To establish the need to embrace the changing technology and the availability of

    these technologies and comparison with the old so as to reach the users needs.

    b) To establish the need for the organizational commitment to finance the

    introduction of the new system and its viability.

    c) To identify the components of the old systems to be borrowed to the new

    system.

    d) To ascertain the authenticity of the project in the legal matters.

    e) To realize an appropriate time for the new system implementation

    3.3 methodology

    In feasibility study, the following methods were used in fact gathering:a) Observation

    b) Interview

    3.3.1 Observation

    I personally carried out the observation to establish the real problems in the old

    system. The major points of my observation were:

    a) Students registrationb) Documentation and filling

    c) Accounts section

    3.3.2 Interview

    I carried out an interview to obtain the response from the following individuals

  • 8/2/2019 Computerization of the Hostel Department-final Report

    23/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Hostel administrator Hostel janitor.

    The purpose of these interviews was to establish the real problem and obtain theirresponse and views on the old and new system.

    3.4 FINDINGS

    The following are the responses I got after carrying out the interview and after carrying

    out the observation for fact finding

    i. Accuracy And Reliability

    After carrying out the interview where two individuals were involved and also through

    observation:

    Errors made during the data entry could not be easily corrected because they could

    not be identified easily.

    Data is entered manually and also accounts done manually paving room for

    occurrence of logical errors and errors of omission and commission.

    The officials interviewed saw the manual system posed an overhead in the management

    compared to the computerized system.

    ii. Data security, storage and retrieval

    Files are usually lost or misplaced hence a file sometimes is not available when needed.

    Retrieval of the stored files is cumbersome and could take the whole day to obtain a

    single file.

    The question on whether the manual system was satisfying and the observation I

    carried out on the same, I was able to obtain the responses as shown in the table bel

    Satisfying Not satisfying

    Data security 45% 55%

    Data storage 5% 95%

    Data retrievals 15% 85%

    Table 2: Observational table

  • 8/2/2019 Computerization of the Hostel Department-final Report

    24/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    iii. General cost of the manual systems

    The investigation I carried out in the old system received the following response from

    the interview:

    Some saw it to be very expensive to maintain the manual system since it required morepersonnel to run it while less people saw it expensive to install a computerized system

    which could be operated by few individuals.

    EXPENSIVE NOT EXPENSIVE NO RESPONSE TOTAL

    65% 25% 10% 100%

    3.5 ANALYSIS OF THE FINDINGS

    After carrying out the system investigation, the following are the conclusion I reached

    as my observation in the general analysis.

    a) The hostel administrating body interviewed agreed that the old system is quite

    expensive.

    b) From the observations made, I realized that most students (70%) were not happy

    with the long queues and delays during room allocation.

    3.6 COST BENEFIT ANALYSIS

    To justify a new system over the old system or vise versa, it is important to carry

    out the cost benefit analysis to proof the viability of the project. It is with this reason,

    that I carried out the system costing to establish the requirements that both manual

    and computerized systems needed to be compared

    The following table shows the comparison of costs between these two systems

    Table 3 : Views on cost

  • 8/2/2019 Computerization of the Hostel Department-final Report

    25/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CURRENT SYSTEM COMPUTERISED SYSTEM

    ITEM QUANTITY COST PER

    MONTH

    ITEM QUANTITY COST

    PERMONTH

    4 Employees 4*10,000 40,000 1 employee 1* 10,000 10,000

    Operational

    cost

    15,000 15,000 Operational

    cost

    9,000 5,000

    TOTAL 55,000 TOTAL 15,000

    For the whole system to be operational by using computerized systems, the following

    costs shall be incurred for the purchase of the computer and computer accessories:-

    Purchase of 2 computers ........................................2*30,000= 60,000

    Laser jet Printer ......................................................2*4,000= 8,000

    2 UPS ......................................................................... 2*4,500= 9,000

    Windows XP O/S ....................................................1*5,000= 5,000

    Office 2003 professional .........................................1*5,000= 5,000

    Visual studio ver 6.0 .......................................................................3,000

    Kasperskey anti-virus .....................................................................3,000

    Miscellaneous ..................................................................................10,000

    Total ..................................................................................................103,000

    Table 1: Comparison between Cost of running computerized and of manual system

  • 8/2/2019 Computerization of the Hostel Department-final Report

    26/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    27/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER FOUR

    4.0 SYSTEM REQUIREMENTS

    4.1 HARDWARE REQUIREMENTS

    Printers- 2 Laser jet printers

    UPS

    2 Desktop computers

    - Pentium IV speed: 3.0 Ghz

    - 256 RAM Expandable

    - 40 GB

    17 Monitor Screen

    4.2 SOFTWARE REQUIREMENTS

    Microsoft Office 2000 Professional

    - Ms Access, Word, Excel, PowerPoint

    Microsoft XP O/S

    Microsoft Visual Basic

    Ant-Virus - Kaspersky

    4.3 PERSONEL REQUIREMENTS

    1 Data entry clerk

    -Should have had experience in computer applications

    Roles

    Will be responsible for

    - the data entry

    - creation of backups

    Database administrator

    - Should be a Degree holder in a related field of specialization.

    - Responsible for creation of databases and maintenance of databases

    - Creation of backups

    - Data security

  • 8/2/2019 Computerization of the Hostel Department-final Report

    28/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER FIVE

    4.0 Presentation of the project.

    4.1 contexts

    HMS is a standalone application. The user manages the application via a simple

    graphical user interface (G U I). The user has to log in into the system by entering a

    password before he can start using the application. Quitting the application

    automatically logs out the user.

    HMS gives administrative rights to the single user who logs in. The administrator tasks

    are updating, deleting or editing of students hostel records.

    The easy to use interface makes this straight forward. The number of options and the

    description text (where possible) must be entered. Naturally, Hostel Management

    System ensures that nobody else, except the user who is currently logged on has access

    to information that it stores.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    29/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    4.2 Using Case Diagrams

    Hostel Management System

  • 8/2/2019 Computerization of the Hostel Department-final Report

    30/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    4.2.1 Use Cases

    Use case: Launch application

    Scope: Hostel Management System

    Intention in context: The intention of the user is to start the application in

    preparation for entry of student details. The user must pass authentication by providing

    an appropriate password.

    Main success scenario:

    1. User starts up the application.

    2. User provides authentication.

    3. The application input interface is launched.Extensions:

    2.a) User provide wrong login password

    2. a.1) The application informs the user of a wrong password entered.

    2.a.2) The application gives the user two other chances of re- entering the

    password(under construction).

    2. a.3) If user enters wrong password 3 times, the application logs him off.

    (under construction).Use case: Data Input

    Scope: Hostel Management System.

    Intention in context:

    User wants to feed student data into the application. The user inputs some of the

    data from the options provided. If an option is not specified by the user, the

    default option is taken.

    Main case scenario:

    1. User feeds student's personal details to the application.

    2. User selects a hostel block.

    3. User inputs payment status of the student.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    31/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    4. User defines the students course of study.

    Use case: Hostel block allocation

    Scope: Hostel Management System.Intention in context: The user defines the hostel wing to house the student. The

    hostel wing selected give the room number to be occupied by the student, the key

    number and the condition of the room, whether it is good, fair or in need of renovation

    is ascertained.

    Main success scenario:

    1. User allocates a room to a student.

    1.1) Student is allocated a key with the room number1.2) Items issued to the students are ascertained.

    1.3) The condition of the room is ascertained.

    1. User updates the record of a student.

    Use case: Course of study:

    Scope: Hostel Management System.

    Intention in context: The course pursued by a student has to be identified. Theschool, year of study and the academic semester have to be defined.

    Main success scenario:

    1.) User gives the school which a student belongs to. The year of study

    and the academic semester are provided

    2.) User updates student's record.

    Extensions:

    2.1) Application verifies whether invalid year of study or academic semester has

    been provided.

    2.1.a)The application warns the user on provision of invalid academic year

    or semester.

    2.1.b)The system gives user a chance of entering the correct academic year

  • 8/2/2019 Computerization of the Hostel Department-final Report

    32/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    and semester.

    Use case: Payment Details.

    Scope: Hostel Management System.Intention in context: The payment status of a student is to be ascertained.

    Main success scenario:

    1.) User inputs amount paid by student.

    2.) Application Computes balance owed by student.

    3.) Use provides date of payment of hostel fee.

    4.) User provides receipt number

    5.) User updates student's record.

    Extensions:

    1.a) Application ascertains the amount paid by the student and outstanding

    balance.

    1.a.i) If amount is less than the required fee and the outstanding balance is

    greater than or equal to half the required fee, student is denied room allocation.

    1.a.ii) Application informs user that the student been denied room allocation.

    1.a.iii) The student's record is not updated.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    33/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER SIX

    5.0 SYSTEM DESIGN

    System design is part of system development life cycle where by the system is modeled

    to meet the user specification requirements.

    1.0 DESIGN APPROACH

    I employed a top down approach in the design of the system, whereby I decomposed

    the system into smaller individual functional programs. This approach enables a system

    developer interact with ease with the different modules making up the system and also

    gives him an opportunity for addition of other sections in future when needs arise.

    PROCESS DESIGN TOOLS

    The logical schematic representation of HMS is outlined below.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    34/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    FLOW CHARTS

    Students module

    Save Procedure

    START

    Display

    message

    Move lastADD Displayrecord

    Load add form

    Y

    Enter Student

    Details

    Save Student Details

    Display student

    Print details

    View student details

  • 8/2/2019 Computerization of the Hostel Department-final Report

    35/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Save flow chart diagram

    Find Procedure tomorrow

    Found

    ?

    Display Record

    Find record

    START

    Input Student

    Reciept Number

    STOP

    Find

    Another

    Displaymessa e

  • 8/2/2019 Computerization of the Hostel Department-final Report

    36/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    37/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Move First Processing

    Start

    Last

    Record?

    Move Last

    DisplayMessage

    Display

    Records

    Sto

    Display

    message

    N

    Y

  • 8/2/2019 Computerization of the Hostel Department-final Report

    38/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Move Next processing

    Start

    LastRecord

    ?

    DISPLAY

    MESSAGE

    Move Last

    Display

    Message

    Display

    Records

    Stop

    N

    Y

  • 8/2/2019 Computerization of the Hostel Department-final Report

    39/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    40/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Move Last Procedure

    Display

    Message

    Start

    Last

    Record

    ?

    Move Last

    Display

    Message

    Display

    Records

    Stop

    N

    Y

  • 8/2/2019 Computerization of the Hostel Department-final Report

    41/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Structural Decomposition

    Hostel Management

    System

    Student

    module

    PersonalDetails

    AcademicDetails

    PaymentDetails

    HostelDetails

    SearchModule

    Student

    module

  • 8/2/2019 Computerization of the Hostel Department-final Report

    42/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER SEVEN

    6.0 IMPLEMENTATION

    This phase involved activities which lead to a shift from the current Hostel management

    system to the newly developed system.

    6.1 IMPLEMENTATION PLAN

    This encompassed the following activities:

    Site Preparation

    The first step taken shall involve visiting the site where the project will be implemented

    to identify the suitable room to install the required machines.

    This shall be followed by proper furnishing of the identified room to accommodate the

    necessary computers and computer accessories required for ease of implementation of

    HMS.

    For security purposes, metal doors are to be enacted so as to prevent equipment from

    theft. All these tasks shall take two weeks in approximation.

    COMPUTER PROCUREMENT

    This shall involve the purchase of computers by the organization (Masinde Muliro

    University of Science and Technology) for the implementation of the system.

    Installation of the necessary software programs shall follow.

    6.2 TEST PLAN

    This was done with an intention of identifying programming bugs in the system prior

    to its implementation, and optimization of its performance.

    The system developer employed tests on the input data and compare it with the output

    as well as the expected results. To ensure accuracy in performing this phase tasks,

    system developer employed two techniques of system tests. This included:-

  • 8/2/2019 Computerization of the Hostel Department-final Report

    43/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    6.2.1. BLACK BOX TESTING

    Black-box testing is a method of software testing that tests the functionality of an

    application as opposed to its internal structures or workings

    I used the external descriptions of HMS, including specifications, requirements, anddesign to derive test cases.

    6.3 CHANGEOVER

    This is the process whereby the new system becomes part of the management tool.

    After the computers, computer accessories and programs are put in place, the

    changeover will begin.

    The new system shall be introduced to the staffs and management.A parallel method of changeover is what the programmer will use in this stage whereby

    the old and new system shall be run concurrently with an aim of identifying the

    performance shift. The reason for this mechanism is to compare between the two

    systems. The programmer intends to perform this changeover strategy during the

    normal day activities so that he can identify the bugs right before it is late.

    This phase shall require two months to fully switch to the new system.

    6.4. FILE CONVERSION

    File conversion refers to the shuffling from the old systems files to the new systems. The

    programmer will transfer all the Colleges important documents and files to the

    computer disks and create their backups.

    Microsoft access shall be used to create databases and Integrity of the output in

    comparison to the expected standards.

    The programmer intends to use this testing mechanism whereby he will conduct it at

    interfaces. It will demonstrate how the input is accepted, processed and output is

    produced and that the data integrity is maintained.

    Here, what happens to the data in the processing stage inside the system (logic) is not

    focused on but features error checking in:-

  • 8/2/2019 Computerization of the Hostel Department-final Report

    44/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Interfaces

    Incorrect function

    Initialization and termination errors

    Performance errors Errors in database

    WHITE BOX TESTING

    In this testing technique, the logic and all other components of the system are checked.

    This technique ensures that the operations of the computer software performanceaccording to the required needs.

    The logic path in processing which include loops, conditions and sequences are all in

    good order. The validly of all codes and data structures are also checked.

    6.5TRAINING

    Training is the activities of imparting the knowledge to the system users on how to

    access and use the new system more effectively. This is projected to be implemented in

    the following manner.

    INTRODUCTORY TRAINING

    This is more of orientation to the new system. It shall involve the management and

    other staff. This is necessary in order to get everyone appreciate and embrace the new

    system.

    JOB TRAINING

    Hand on practice shall be required for the few who shall be interacting directly with

    the system. The system analyst shall be involved in this training.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    45/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    GROUP DISCUSSION AND WORKSHOP

    The stake holders of the new system shall be required to share their experiences of the

    new system through sessions such as workshops and discussions. This has been

    projected to help them in sharing of ideas in the use and management of the new

    System.

    PROCEDURAL TRAINING

    The manual produced is necessary for this training. All procedures and system

    specifications employed are all stated the user manual. This will help the users react to

    questions they want to ascertain.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    46/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    CHAPTER EIGHT

    8.0 CONCLUSION AND RECOMMENDATIONS

    8.1 CONCLUSIONS

    The programmer and system analyst involved in this project is convinced thathis views on the current system of Masinde Muliro University System have been

    well documented and programmed into a simple, easy and enjoyable way to

    help the College to manage its documents and data in an organized and cheap

    way.

    He is also convinced that in future, with the assistance of fellow programmers,

    the system will be improved to a standard to accommodate features that have

    not been incorporated at this stage.

    The programmer welcomes views, ideas and criticisms that will help to improve

    this system for future generations.

    8.2 RECOMMENDATIONS

    It is with high regard that the analyst of this project appeals to the management

    of Masinde Muliro University Of Science and Technology to put the system into

    proper use, seek assistance whenever a problem seems to occur from a qualified

    person and allow room, for system improvements so that the college runs its

    affairs with the help of the best system possible. The administration of Masinde

    Muliro University are required to keep this project documentation safe for future

    reference in case of a system breakdown or for consideration of improving on the

    features that may need to be incorporated in the system.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    47/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    User Manual

    Title: HMS User Manual

    Version: 1.0Date: April 2012

    Produced by: Amugada Stephen Ambani

    Copyright 2012 Xavinski Technologies

    All Rights Reserved

    No part of this manual may be reproduced or transmitted in any form or by any

    means without prior written consent of Amugada Stephen.

    Notice

    The information in this manual is subject to change without prior notice. Every effort hasbeen made in the preparation of this manual to ensure accuracy of the contents, but allstatements, information, and recommendations in this manual do not constitute thewarranty of any kind, expressed or implied.

    Conventions

    In this document the following conventions are used:

    A bold font is used to represent a keyboard key, pressed to invoke anevent or an interface control in the application.

    A bold and italicizedfont is used to represent a mouse event.

    A bold, underlined and italicizedfont is used to represent a menuoption

  • 8/2/2019 Computerization of the Hostel Department-final Report

    48/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    1 Launching The ApplicationTo launch HMS, click at;

    Start Button All ProgramsHMS.

    Note Whenyou are required to enter a password, enter the correct password

    and click Validate. If you fail to provide the correct password you will bedenied login.

    You can exit the application by clicking at the Exit button in the loginwindow.

    The login password is created by the administrating user of theapplication.

    Splash Screen

  • 8/2/2019 Computerization of the Hostel Department-final Report

    49/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Login window

    The MDI (Multiple Document Interface)

    Exit ButtonValidate Button

  • 8/2/2019 Computerization of the Hostel Department-final Report

    50/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Launching the Data Input Interface

    The Data input interface is launched by clicking at the Add student interface button ofthe Tool bar.

    Note: When the data input window is launched, the record of the first student in the

    students database is displayed.

    To add a new student, click at the Add new Student button of the main menuwindow

    Overview of the Data Input Interface

    Frame Description

    Student Personal Details Contains controls for entering studentdetails regarding his/her personality

    such as names, nationality e.t.c.Hostel Details Give the locality of the room

    accommodating a student and the keynumber

    Students Academic Details Indicates academic information of aparticular student; such as the studentscourse, year of study and currentacademic year

    Student Payment Details Has controls for capturing studentspayment details such as Amount paid,

    Date of Payment, Outstanding hostelfee balance and the receipt number.

    Database controls of the D. I. I

    Control Description

    Add Button Add a new students record to thestudents database

    Save Button Saves the updated students recordinto the students database.

    Close Button Closes the D.I.I

  • 8/2/2019 Computerization of the Hostel Department-final Report

    51/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    The Data Input Interface(D.I.I)Student information.

    box Control

    Add button

    Combo box

    Add button

    Close button

  • 8/2/2019 Computerization of the Hostel Department-final Report

    52/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    2Manipulating the Data Input Interface

    Entering Student Personal Details

    To enter student personal Details, type the details at their respective text boxes.

    Entering Students Hostel Details

    i. Left clickat the downward pointing arrow of the combo box controls

    ii. In the resultant drop down list, left clickat the preferred option

    Entering students Academic Details

    i. Select students course by left clickingat a combo box option for a particularstudent.

    ii. Left clickat the downward pointing arrows of the combo boxesin the studentsacademic details frame to select a faculty which the student belongs to and

    his/her year of study

    iii. Select the current year of study and semester by left clickingat the combo boxoption which identifies the current year of study and semester respectively.

    Entering students payment details

    i. Type in the Amount paid text box control, the hostel fee paid by a student

    ii. Type the date of payment.

    iii. Click at the check balance button to compute students outstanding hostel feebalance.(under construction)

    Note:

    The outstanding balance is computed automatically when thecheck balance button is clicked immediately after keying in thehostel fee (Amount paid) by a student

  • 8/2/2019 Computerization of the Hostel Department-final Report

    53/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Opening New Data Input Interface

    i. Left clickat Data entry in theApplications menu

    ii. In the resultant dropdown list, left clickat Add new Student.

    3 Navigating through students records.Updating Current Students Records

    2. Ensure that all requisite student details have been provide at the Edit StudentsRecords interface.

    3. Left clickat the Update database control button of the Edit Students Recordsinterface.

    Viewing First, Last, Previous or Next students record in thestudents database.

    i. Left clickat the desired database control button i.e. Last,Previous, First orNext of the Edit Students Records interface.

    ii. The targeted record shall be displayed at the Edit Students Records interface.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    54/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Deleting current students record

    iii. Left clickat the Delete database control button of the Edit Students Recordsinterface.

    2. A message box shall appear to let you confirm whether you want to delete thecurrent selected record, with a Yes and No options.

    3. Click at the Yes option to confirm your deletion. Otherwise click at the No option.This will abort the deletion process.

    Caution.Deleting a record permanently removes it from the database. Delete onlyobsolete records.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    55/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    4Viewing Students Details

    View a Snapshot of current student details

    i. Left clickat Edit Recordsbuttonin the applications menuii. Navigate through using the database control buttons

  • 8/2/2019 Computerization of the Hostel Department-final Report

    56/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    5Printing student details

    Print a snapshot of current student details

    i. Open the current report: Click on Repots, then Click on Registered Students.

    ii. Click at Print Button

    Print students report

  • 8/2/2019 Computerization of the Hostel Department-final Report

    57/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    6Managing HMS

    Change login password

    i. Left clickat Administrator=>Security=>change passwordin theapplications menu.

    ii. Click at change password. This will launch the password settings window

    iii. Type in your new password in the provided textbox.

    Clear Button

    Change Password

    Cancel button

  • 8/2/2019 Computerization of the Hostel Department-final Report

    58/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    iv. Retype the password in the confirm your password text box to establish amatch with the already typed password.

    v. Left clickat the change password button. A message box will appear to

    confirm the creation of a new password.

    vi. Click at the OK button of the password settings window to close the passwordsettings window.

    Change the standard hostel fee amount

    i. Click at Administratorin the applications menu

    ii. Left clickat Update Hostel Fee. This will launch the Update Hostel Fee window.

    Update buttonClear field Button

    Exit Button Cancel button

  • 8/2/2019 Computerization of the Hostel Department-final Report

    59/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Update Hostel Fee window

    iii. Key in the new hostel fee value.

    iv. Click at the Update button. A message box will appear to warn you of a changein the current hostel fee value. Click at the Yes button to proceed with thecreation of a new hostel fee value. Another message box will appear to indicate asuccessful creation of a new hostel fee value. Otherwise click at the No button toabort the creation of a new hostel fee value.

    v. Click at the Exit button to close the Update Hostel Fee window.

    Note: You can use the Clear Field button to clear values entered in EnterNew Hostel Fee textbox before updating.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    60/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    7 Accessing HMS Help sectionLaunching HMS help files

    i. Left clickat HelpButton in the applications menuii. The help documentation launches

    iii. Click at Help.=>Documentation This launches the HMS help window

    HMS Help window

  • 8/2/2019 Computerization of the Hostel Department-final Report

    61/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    8 Quitting HMS.i. Left clickat Filein the applications menu

    ii. Click at Exitto terminate HMS .A message box will appear with a Yes and Nooptions. Click the Yes option to terminate HMS. This closes HMS and all itsrelated open windows. Otherwise click at the No option to abort terminatingHMS.

    iii. Alternatively click at the Exit button of HMS parent window, at the tool Bar or top

    right corner of the screen(MDI).

  • 8/2/2019 Computerization of the Hostel Department-final Report

    62/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    9Acronyms and Abbreviations

    HMSHostel Management System

    D.I.I - Data Input InterfaceMDIMultiple Document Interface

  • 8/2/2019 Computerization of the Hostel Department-final Report

    63/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    64/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    65/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    References

    Jeffrey L.W. :System analysis and design Methods, Mc Graw-Hill, 2000

    Sarah E.H, Glen J.C.: Microsoft access 2000 Complete Edition, Mc Graw-Hill, 2000

    Georges Ifrah. The Universal History of Numbers: From Prehistory to the Invention of the

    Computer, Wiley, 2000.

    Campbell-Kelly, Martin, and William Aspray. Computer: A History of the Information

    Machine. New York: HarperCollins, 1997.

    Miller, Michael J. "Introduction of the PC: 1981." PC Maga7ine, 25 March 1997.

    "More Storage Means More Management." Computer Industry Report, 27 April 1999.

    Narisetti, Raju. "New IBM Mainframes, 15% Faster Than Expected, Pressure Its Rivals."

    Wall Street Journal, 28 July 1998.

  • 8/2/2019 Computerization of the Hostel Department-final Report

    66/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    SYSTEM CODES

    MODULE CODES

    Public dbase As ADODB.ConnectionPublic rsconn As ADODB.Recordset

    Public Sub dBaseConnect()

    Set dbase = New ADODB.Connectiondbase.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path &"\EHOSTEL.mdb"End Sub

    Sub xa()Dim reply As Integerreply = MsgBox("Are you sure you want to exit HMS?", vbYesNoCancel +

    vbQuestion + vbDefaultButton2, "Exit HAS")If reply = vbYes ThenEnd

    End If

    End Sub

    FORM SPLASH CODES'*************************************' Hostel Management System' Version 1.0.0' Created by Mr. Amugada Stephen Ambani' dated:2012'*************************************' form splash'*************************************

    Private Sub Form_Load()

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

    'Activate timer to launch the progressbar

    counter = 0ProgressBar1.Value = 0

  • 8/2/2019 Computerization of the Hostel Department-final Report

    67/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    ProgressBar2.Value = 0

    tmrsplash.Enabled = TrueTimer1.Enabled = True

    title = "MASINDE MULIRO UNIVERSITY "lblmessage.Alignment = 2lblcopyright.Caption = "Copyright " & Chr$(169) & " 2012: Programmer: AmugadaStephen Ambani"lblcopyright.BackColor = &H4080&lbllicence2.Visible = False

    End Sub

    Private Sub Timer1_Timer()ProgressBar2.Value = ProgressBar2.Value + 3counter = counter + 3

    lblmmust.Caption = Left(title, counter)If lbllicence1.Visible = True Thenlbllicence1.Visible = Falselbllicence2.Visible = True

    ElseIf lbllicence2.Visible = True Thenlbllicence2.Visible = Falselbllicence1.Visible = TrueEnd If

    End Sub

    Private Sub tmrsplash_Timer()'timer event is fired'shows progress bar in the welcome window' if progress bar reaches 100 tDim today As Varianttoday = Now

  • 8/2/2019 Computerization of the Hostel Department-final Report

    68/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    ProgressBar1.Value = ProgressBar1.Value + 2lblcounter.Caption = ProgressBar1.Value & "%"If ProgressBar1.Value = 1 Thenlblload.Caption = "Collecting Program files..."

    ElseIf ProgressBar1.Value = 20 Then

    lblmessage.Caption = "You are about to login at " & Format(today, "hh:mm:ss ampm")

    ElseIf ProgressBar1.Value = 40 Then

    lblload.Caption = "Loading Program files..."

    lblmessage.Caption = "Manage Your Student's Records Effectively"

    ElseIf ProgressBar1.Value = 60 Then

    lblmessage.Caption = "Retrieve a Student's Record with ease"

    ElseIf ProgressBar1.Value = 80 Then

    lblload.Caption = "Almost Done..."lblmessage.Caption = "Reduce Your Paper Work by almost 95%"

    ElseIf ProgressBar1.Value = 90 Thenlblofficebox.Caption = "P.O BOX 190 KAKAMEGA"lblload.Caption = "Thank you for your patience"lblmessage.Caption = "Lets all Save our trees"Timer1.Enabled = False

    ElseIf ProgressBar1.Value >= 100 Then

    tmrsplash.Enabled = False

  • 8/2/2019 Computerization of the Hostel Department-final Report

    69/113

  • 8/2/2019 Computerization of the Hostel Department-final Report

    70/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    FORM UNLOAD CODESPrivate Sub Form_Unload(Cancel As Integer)Dim q As Stringq = MsgBox("Are you sure?" & vbNewLine & "Do you want to quit.", vbExclamation +vbYesNo, "Quit")

    If q = vbYes ThentxtUserName.Text = ""Me.txtPassword.Text = ""Cancel = 0EndElsetxtUserName.Text = ""Me.txtPassword.Text = ""Cancel = 1End If

    End Sub

    COMMAND BUTTON OK CODESPrivate Sub cmdOk_Click()On Error Resume Next

    'On Error GoTo errMDIForm1.mnuAboutHMS.Enabled = TrueIf Me.txtPassword.Text = "" ThenMsgBox "Enter Password", vbInformation, "Missing Information"

    txtPassword.SetFocusEnd If

    dBaseConnectSet rsconn = New ADODB.Recordset

    With rsconn.CursorLocation = adUseClient.LockType = adLockOptimistic.Source = "select * from users"

    .ActiveConnection = dbase

    .OpenEnd With'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

  • 8/2/2019 Computerization of the Hostel Department-final Report

    71/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''If Not rsconn.EOF ThenDo Until rsconn.EOF'If txtPassword.Text rsconn!Password Then'MsgBox "Incorect Passwors,Try Again!", vbInformation, "Invalid Credentials"If txtPassword.Text = rsconn!Password And Me.txtUserName.Text =rsconn!USER_NAME Then

    Me.HideMDIForm1.Show

    'Else'MsgBox "Wrong Password or Username Combination"End If

    rsconn.MoveNextLoop

    Set rsconn = Nothing

    End If

    'If Me.txtUserName.Text = "Admin" Then MDIForm1.mnuadministrator.Enabled =True Else'MDIForm1.mnuadministrator.Enabled = False

    'err:'MsgBox "Pleas enter Login detailsdetails" & err.Description, vbCritical

    'err:'MsgBox "Pleas enter Login detailsdetails" & err.Description, vbCritical

    End Sub

  • 8/2/2019 Computerization of the Hostel Department-final Report

    72/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    COMMAND BUTTON CALCEL CODES

    Private Sub cmdcancel_Click()Call xa

    Set frmLogin = Nothing

    End Sub

    STUDENT INFORMATION

    COMMAND BUTTON SAVEPrivate Sub cmdSave_Click()On Error Resume Next

    'On Error GoTo ErrorHandler

    Dim asKey, asKey1, asKey2, asKey3, asKey4, asKey5, asKey6 As IntegerasKey = Asc(txtsurname.Text)asKey1 = Asc(txtFirstName.Text)asKey2 = Asc(txtotherNames.Text)'asKey3 = Asc(txtRegistrationNumber.Text)'asKey4 = Asc(txtPhoneNumber.Text)'asKey5 = Asc(txtAmountPaid.Text)'asKey6 = Asc(txtReceiptNumber.Text)'asKey = Asc(txtsurname.Text)

    'cmdSave.Enabled = False'cmdUpdate.Enabled = True'''''''''''''''''''''''If asKey1 = 32 And asKey2 = 32 Then MsgBox "Please Enter First Name or OtherName!", vbInformation, "Invalid Data Type"txtFirstName.SetFocus

    If txtsurname.Text = "" Or txtFirstName.Text = "" Or asKey = 32 Then'And txtotherNames.Text = "" Or txtRegistrationNumber = "" Or cboschool = "" Or

    txtAmountPaid.Text = "" Or txtReceiptNumber.Text = "" ThenMsgBox "Please fill all the details", , "HMS-Missing value"ElseIf IsNumeric(txtsurname.Text) ThenMsgBox "Surname: Please enter valid Surname ", vbCritical, "Invalid Data type -HMS"txtsurname.Text = ""Me.txtsurname.SetFocusElseIf IsNumeric(Me.txtFirstName.Text) Then

  • 8/2/2019 Computerization of the Hostel Department-final Report

    73/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    MsgBox "First Name:Please Enter Valid First Name", vbCritical, "Invalid Data type -HMS"txtFirstName.Text = ""Me.txtFirstName.SetFocusElseIf IsNumeric(Me.txtotherNames.Text) Then

    MsgBox "Other Names: Please Enter Valid Name", vbCritical, "Invalid Data type -HMS"txtotherNames.Text = ""Me.txtotherNames.SetFocusElseIf Not IsNumeric(Me.txtPhoneNumber.Text) ThenMsgBox "Phone Number: Please enter Valid Phone Number", vbCritical, "Invalid Datatype - HMS"txtPhoneNumber.Text = ""Me.txtPhoneNumber.SetFocusElseIf IsNumeric(Me.cboCountry.Text) Then

    MsgBox "Country: Please Select a County", vbCritical, "Invalid Data type - HMS"ElseIf Not IsNumeric(txtAmountPaid.Text) ThenMsgBox "Amount: " & txtAmountPaid & " not valid"txtAmountPaid.SetFocus'''''''''''''''''''''''''''''''''''''''''''''ElseIf Not IsNumeric(txtReceiptNumber.Text) ThenMsgBox "Receipt Number: " & txtReceiptNumber & " not valid"txtReceiptNumber.SetFocus

    Else

    dBaseConnect

    Set rsconn = New ADODB.Recordset

    With rsconn.CursorLocation = adUseClient.LockType = adLockOptimistic.Source = "select * from student".ActiveConnection = dbase.Open

    On Error Resume Next

    .AddNew!RegistrationNo = Me.txtRegistrationNumber!Surname = Me.txtsurname!FirstName = Me.txtFirstName!OtherNames = Me.txtotherNames

  • 8/2/2019 Computerization of the Hostel Department-final Report

    74/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    !gender = Me.txtgender!Nationality = Me.cboCountry!Course = Me.cboCourse!Faculty = Me.cboschool'!Department = me.cbod

    !phone_number = Me.txtPhoneNumber!CDate = Me.DTPicker1!YearOfStudy = Me.cboYearofStudy!Semester = Me.cboSemester!HostelBlock = Me.cboHostelBlock!HostelWing = Me.cboHostelWing!KeyNumber = Me.cboKeyNumber!AmountPaid = Me.txtAmountPaid!OutstandingBalance = Me.lbloutstandingBalance!ReceiptNumber = Me.txtReceiptNumber

    !HostelName = Me.cboHostelName!roomnumber = Me.cboRoomNumber.Update

    MsgBox "Records successfully Saved"Me.txtsurname.Text = ""

    Me.txtFirstName.Text = ""Me.txtotherNames.Text = ""Me.txtgender.Text = ""Me.cboCountry.Text = ""Me.cboCourse.Text = ""

    Me.cboschool.Text = ""Me.txtPhoneNumber.Text = ""Me.txtRegistrationNumber.Text = ""Me.cboHostelName.Text = ""Me.cboYearofStudy.Text = ""Me.cboSemester.Text = ""

    Me.cboHostelBlock.Text = ""Me.cboHostelWing.Text = ""Me.cboKeyNumber.Text = ""Me.txtAmountPaid.Text = 0Me.lbloutstandingBalance.Caption = ""Me.txtReceiptNumber.Text = ""Me.cboHostelName.Text = ""txtRoomNumber.Text = ""

    Me.txtsurname.SetFocusEnd WithcmdSave.Enabled = False

    Set rsconn = Nothing

  • 8/2/2019 Computerization of the Hostel Department-final Report

    75/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Set dbase = Nothing

    End IfEnd Sub

    FORM LOAD CODES

    Private Sub Form_Load()On Error Resume Next

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2'cboGender.AddItem "Male"'cboGender.AddItem "Female"

    'loads the different schools of students

    cboschool.AddItem "Faculty of Engineering"cboschool.AddItem "Faculty of Science"cboschool.AddItem "Faculty of E.S.S."cboschool.AddItem "Faculty of CDMHA"cboschool.AddItem "Faculty of Health Sciences"cboschool.AddItem "Faculty of Engineering"cboschool.AddItem "Faculty of Medicine"

    'cboSchool.ListIndex = 0''''''''''''''''cboRoomNumber.AddItem "1"cboRoomNumber.AddItem "2"cboRoomNumber.AddItem "3"cboRoomNumber.AddItem "4"cboRoomNumber.AddItem "5"cboRoomNumber.AddItem "6"cboRoomNumber.AddItem "7"cboRoomNumber.AddItem "8"cboRoomNumber.AddItem "9"cboRoomNumber.AddItem "11"cboRoomNumber.AddItem "12"cboRoomNumber.AddItem "13"

    ''''''''''''''''''''''''''''''''''''''''cboKeyNumber.AddItem "1"cboKeyNumber.AddItem "2"

  • 8/2/2019 Computerization of the Hostel Department-final Report

    76/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    cboKeyNumber.AddItem "3"cboKeyNumber.AddItem "4"cboKeyNumber.AddItem "5"cboKeyNumber.AddItem "6"cboKeyNumber.AddItem "7"

    cboRoomNumber.AddItem "8"cboRoomNumber.AddItem "9"cboRoomNumber.AddItem "11"cboRoomNumber.AddItem "12"cboRoomNumber.AddItem "13"cboHostelBlock.AddItem "A"cboHostelBlock.AddItem "B"cboHostelBlock.ListIndex = 0'load year of study cboYearofStudycboYearofStudy.AddItem "1"

    cboYearofStudy.AddItem "2"cboYearofStudy.AddItem "3"cboYearofStudy.AddItem "4"cboYearofStudy.AddItem "5"cboYearofStudy.AddItem "6"'cboYearofStudy.ListIndex = 0'load semester cboSemestercboSemester.AddItem "1"cboSemester.AddItem "2"cboSemester.AddItem "3"

    'cboSemester.ListIndex = O'load cboHostelWingcboHostelWing.AddItem "Right"cboHostelWing.AddItem "left"'cboHostelWing.ListIndex = 0

    cboCountry.AddItem "Kenya"cboCountry.AddItem "Uganda"cboCountry.AddItem "Tanzania"cboCountry.AddItem "Burundi"cboCountry.AddItem "Sudan"cboCountry.AddItem "Rwanda"cboCountry.AddItem "Zimbabwe"cboCountry.AddItem "Morroco"cboCountry.AddItem "Zaire"cboCountry.AddItem "Angola"cboCountry.AddItem "Nigeria"cboCountry.AddItem "S. Africa"

  • 8/2/2019 Computerization of the Hostel Department-final Report

    77/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    'cboCountry.ListIndex = 0'''''''''''''''''''''''''''''cboCourse.AddItem "B.S Civil Engineering"cboCourse.AddItem "B.S Electrical and Commercial Engeneering"cboCourse.AddItem "B.S Mechanical and industrial Engeering"

    cboCourse.AddItem "B.S Biology"cboCourse.AddItem "B.S Biotechnology"cboCourse.AddItem "B.S Environmental Mgnt and Cnsvt"cboCourse.AddItem "B.S Food Processing"cboCourse.AddItem "B.S Conservation and Mgnt of Biological Resources"cboCourse.AddItem "B.S Physics"cboCourse.AddItem "B.S Chemestry"cboCourse.AddItem "B.S Computer Science"cboCourse.AddItem "B. Criminology"cboCourse.AddItem "B. Education (Science)"

    cboCourse.AddItem "B. Social work"'cboCourse.ListIndex = 0End Sub

    Private Sub optfemale_Click()If Me.optfemale.Enabled = True ThenMe.txtgender = "Female"

    End IfEnd Sub

    Private Sub optmale_Click()If Me.optmale.Enabled = True ThenMe.txtgender = "Male"End IfEnd Sub

    Private Sub txtdate_Change()'txtdate.Text = DateEnd Sub

    Private Sub txtAmountPaid_Change()On Error Resume Next

    If Me.txtAmountPaid > 3000 ThenMsgBox "HOSTEL FEE IS KSH. 3000"

  • 8/2/2019 Computerization of the Hostel Department-final Report

    78/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Me.txtAmountPaid.SetFocustxtAmountPaid.Text = 0Else

    Me.lbloutstandingBalance = Val((3000 - Me.txtAmountPaid))End If

    End Sub

    Private Sub txtAmountPaid_GotFocus()txtAmountPaid.BackColor = &H8080FFtxtAmountPaid.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtAmountPaid_LostFocus()

    txtAmountPaid.BackColor = RGB(255, 255, 255)txtAmountPaid.ForeColor = RGB(0, 0, 0)

    If Not IsNumeric(txtAmountPaid.Text) ThenMsgBox "Amount be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    Me.txtAmountPaid.Text = 0Me.txtAmountPaid.SetFocusEnd If

    End Sub

    Private Sub txtfaculty_Change()

    End Sub

    Private Sub txtKeyNumber_GotFocus()txtKeyNumber.BackColor = &H8080FFtxtKeyNumber.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtKeyNumbers_LostFocus()

    txtKeyNumber.BackColor = RGB(255, 255, 255)txtKeyNumber.ForeColor = RGB(0, 0, 0)

    If Not IsNumeric(txtKeyNumber.Text) ThenMsgBox "Key Number Must be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    End If

    End Sub

  • 8/2/2019 Computerization of the Hostel Department-final Report

    79/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Private Sub txtKeyNumber_LostFocus()txtKeyNumber.BackColor = RGB(255, 255, 255)

    txtKeyNumber.ForeColor = RGB(0, 0, 0)If Not IsNumeric(txtKeyNumber.Text) ThenMsgBox "Key Number Must be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    End IfEnd Sub

    Private Sub txtotherNames_GotFocus()txtotherNames.BackColor = &H8080FFtxtotherNames.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtotherNames_LostFocus()

    txtotherNames.BackColor = RGB(255, 255, 255)

    txtotherNames.ForeColor = RGB(0, 0, 0)

    If IsNumeric(txtotherNames.Text) ThenMsgBox "Name cannot be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    Me.txtotherNames.Text = ""Me.txtotherNames.SetFocusEnd IfEnd Sub

    Private Sub txtPhoneNumber_GotFocus()txtPhoneNumber.BackColor = &H8080FFtxtPhoneNumber.ForeColor = RGB(255, 255, 255)

    End Sub

    Private Sub txtPhoneNumber_LostFocus()txtPhoneNumber.BackColor = RGB(255, 255, 255)txtPhoneNumber.ForeColor = RGB(0, 0, 0)If Not IsNumeric(txtPhoneNumber.Text) ThenMsgBox "Phone Number Must be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    Me.txtPhoneNumber.Text = ""Me.txtPhoneNumber.SetFocusEnd If

    End Sub

  • 8/2/2019 Computerization of the Hostel Department-final Report

    80/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Private Sub txtReceiptNumber_GotFocus()txtReceiptNumber.BackColor = &H8080FFtxtReceiptNumber.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtReceiptNumber_LostFocus()

    txtReceiptNumber.BackColor = RGB(255, 255, 255)txtReceiptNumber.ForeColor = RGB(0, 0, 0)If Not IsNumeric(txtReceiptNumber.Text) ThenMsgBox "Receipt NumberMust be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    Me.txtReceiptNumber.Text = ""Me.txtReceiptNumber.SetFocusEnd If

    End Sub

    Private Sub txtRegistrationNumber_GotFocus()txtRegistrationNumber.BackColor = &H8080FFtxtRegistrationNumber.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtRegistrationNumber_LostFocus()

    txtRegistrationNumber.BackColor = RGB(255, 255, 255)txtRegistrationNumber.ForeColor = RGB(0, 0, 0)

    End Sub

    Private Sub txtRoomNumber_GotFocus()txtRoomNumber.BackColor = &H8080FFtxtRoomNumber.ForeColor = RGB(255, 255, 255)

    End Sub

    Private Sub txtRoomNumber_LostFocus()txtRoomNumber.BackColor = RGB(255, 255, 255)txtRoomNumber.ForeColor = RGB(0, 0, 0)

    If Not IsNumeric(txtRoomNumber.Text) ThenMsgBox "Room NumberMust be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    End If

    End Sub

  • 8/2/2019 Computerization of the Hostel Department-final Report

    81/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Private Sub txtsurname_GotFocus()txtsurname.BackColor = &H8080FFtxtsurname.ForeColor = RGB(255, 255, 255)

    End Sub

    Private Sub txtsurname_LostFocus()txtsurname.BackColor = RGB(255, 255, 255)txtsurname.ForeColor = RGB(0, 0, 0)If IsNumeric(txtsurname.Text) ThenMsgBox "Name cannot be NUMERIC!", vbCritical, "IVALID DATA TYPE"

    Me.txtsurname.Text = ""Me.txtsurname.SetFocusEnd If

    End SubPrivate Sub txtFirstName_GotFocus()

    txtFirstName.BackColor = &H8080FFtxtFirstName.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtFirstName_LostFocus()

    txtFirstName.BackColor = RGB(255, 255, 255)txtFirstName.ForeColor = RGB(0, 0, 0)

    If IsNumeric(txtFirstName.Text) Then

    MsgBox "Name cannot be NUMERIC!", vbCritical, "IVALID DATA TYPE"Me.txtFirstName.Text = ""Me.txtFirstName.SetFocusEnd If

    End Sub

    COMMAND BUTTON CANCEL CODDESPrivate Sub cmdClose_Click()Unload Me

    End Sub

    EDIT STUDENTS FORM CODES

  • 8/2/2019 Computerization of the Hostel Department-final Report

    82/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    FORM LOAD CODESPrivate Sub Form_Load()On Error Resume Next

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

    End Sub

    COMMAND BUTTON UPDATE

    Private Sub cmdUpdate_Click()On Error Resume NextdBaseConnectSet rsconn = New ADODB.RecordsetIf Me.cboregNo = "" Then

    MsgBox "please locate student to change details", vbInformation, App.titleElse

    Set rsconn = dbase.Execute("UPDATE student Set Surname='" & Me.txtsurname.Text& "',KeyNumber='" & Me.txtKeyNumber.Text & "',Semester='" & Me.txtSemester.Text &"',AmountPaid='" & Me.txtAmountPaid.Text & "',CDate='" & Me.txtdate.Text &"',OutstandingBalance='" & Me.txtoutstandingBalance.Text & "',ReceiptNumber='" &Me.txtReceiptNumber.Text & "',FirstName='" & Me.txtFirstName.Text &"',HostelWing='" & Me.txtHostelWing.Text & "',HostelBlock='" &Me.txtHostelBlock.Text & "',hostelName='" & Me.txtHostelName.Text &

    "',OtherNames='" & Me.txtotherNames.Text & "',Gender='" & Me.txtgender.Text &"',Nationality='" & Me.txtCountry.Text & "',Course='" & Me.txtcourse.Text &"',Faculty='" & Me.txtSchool.Text & "',phone_number='" & Me.txtPhoneNumber.Text &"',YearOfStudy='" & Me.txtYearofStudy.Text & "',roomnumber='" &Me.txtRoomNumber.Text & "' where RegistrationNo='" & Me.cboregNo & "'")With rsconn

    .CursorLocation = adUseClient

    .LockType = adLockOptimistic

    .Source = "select * from student "

    .ActiveConnection = dbase

    .Open

    End With

    rsconn.UpdateMsgBox "record successfully updated", vbInformation, "edit details"Me.cboregNo.SetFocusMe.txtsurname.Text = ""

  • 8/2/2019 Computerization of the Hostel Department-final Report

    83/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Me.txtFirstName.Text = ""Me.txtotherNames.Text = ""Me.txtgender.Text = ""Me.txtPhoneNumber.Text = ""Me.txtCountry.Text = ""

    Me.txtHostelName.Text = ""Me.txtHostelBlock.Text = ""Me.txtHostelWing.Text = ""Me.txtRoomNumber.Text = ""Me.txtKeyNumber.Text = ""Me.txtSchool.Text = ""Me.txtSchool.Text = ""Me.txtYearofStudy.Text = ""Me.txtdate.Text = ""Me.txtoutstandingBalance.Text = 0

    Me.txtReceiptNumber.Text = ""

    End If

    Set rsconn = NothingSet dbase = Nothing

    End Sub

    Private Sub txtAmountPaid_GotFocus()txtAmountPaid.BackColor = &H8080FFtxtAmountPaid.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtAmountPaid_LostFocus()

    txtAmountPaid.BackColor = RGB(255, 255, 255)txtAmountPaid.ForeColor = RGB(0, 0, 0)On Error Resume Next

  • 8/2/2019 Computerization of the Hostel Department-final Report

    84/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    If Me.txtAmountPaid.Text > 3000 ThenMsgBox "Hostell Fee is 3000"txtAmountPaid.Text = 0ElseIf Me.txtAmountPaid.Text = "" Or Not IsNumeric(Me.txtAmountPaid.Text) ThenMsgBox "Cannot be Non-Numeric "

    ElseMe.txtoutstandingBalance = Val((3000 - Me.txtAmountPaid))End If

    End Sub

    Private Sub txtKeyNumber_GotFocus()txtKeyNumber.BackColor = &H8080FF

    txtKeyNumber.ForeColor = RGB(255, 255, 255)End SubPrivate Sub txtKeyNumbers_LostFocus()

    txtKeyNumber.BackColor = RGB(255, 255, 255)txtKeyNumber.ForeColor = RGB(0, 0, 0)

    End Sub

    Private Sub txtotherNames_GotFocus()txtotherNames.BackColor = &H8080FFtxtotherNames.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtotherNames_LostFocus()txtotherNames.BackColor = RGB(255, 255, 255)txtotherNames.ForeColor = RGB(0, 0, 0)

    End Sub

    Private Sub txtPhoneNumber_GotFocus()txtPhoneNumber.BackColor = &H8080FFtxtPhoneNumber.ForeColor = RGB(255, 255, 255)

    End Sub

    Private Sub txtPhoneNumber_LostFocus()txtPhoneNumber.BackColor = RGB(255, 255, 255)txtPhoneNumber.ForeColor = RGB(0, 0, 0)

  • 8/2/2019 Computerization of the Hostel Department-final Report

    85/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    End Sub

    Private Sub txtReceiptNumber_GotFocus()txtReceiptNumber.BackColor = &H8080FFtxtReceiptNumber.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtReceiptNumber_LostFocus()

    txtReceiptNumber.BackColor = RGB(255, 255, 255)txtReceiptNumber.ForeColor = RGB(0, 0, 0)

    End Sub

    '''''''''

    Private Sub txtRegistrationNumber_GotFocus()txtRegistrationNumber.BackColor = &H8080FFtxtRegistrationNumber.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtRegistrationNumber_LostFocus()

    txtRegistrationNumber.BackColor = RGB(255, 255, 255)txtRegistrationNumber.ForeColor = RGB(0, 0, 0)

    End Sub

    Private Sub txtRoomNumber_GotFocus()txtRoomNumber.BackColor = &H8080FFtxtRoomNumber.ForeColor = RGB(255, 255, 255)

    End Sub

    Private Sub txtRoomNumber_LostFocus()txtRoomNumber.BackColor = RGB(255, 255, 255)txtRoomNumber.ForeColor = RGB(0, 0, 0)

    End Sub

    Private Sub txtsurname_GotFocus()txtsurname.BackColor = &H8080FFtxtsurname.ForeColor = RGB(255, 255, 255)

  • 8/2/2019 Computerization of the Hostel Department-final Report

    86/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    End Sub

    Private Sub txtsurname_LostFocus()txtsurname.BackColor = RGB(255, 255, 255)

    txtsurname.ForeColor = RGB(0, 0, 0)

    End SubPrivate Sub txtFirstName_GotFocus()

    txtFirstName.BackColor = &H8080FFtxtFirstName.ForeColor = RGB(255, 255, 255)

    End SubPrivate Sub txtFirstName_LostFocus()

    txtFirstName.BackColor = RGB(255, 255, 255)

    txtFirstName.ForeColor = RGB(0, 0, 0)End Sub

    COMMAND BUTTON CANCEL CODES

    Private Sub cmdClose_Click()Unload MeEnd Sub

    CREATE NEW HOSTEL FORM CODES

    FORM LOAD CODESPrivate Sub Form_Load()On Error Resume Next

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

    cbogender.AddItem "Male"

    cbogender.AddItem "Female"cbogender.AddItem "Mixed"

    End Sub

    COMMAND BUTTON ADDNEW CODES

  • 8/2/2019 Computerization of the Hostel Department-final Report

    87/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Private Sub cmdaddnew_Click()If Me.txtHostelName.Text = "" Or Me.cbogender.Text = "" Or Me.txtCapacity.Text = ""ThenMsgBox "Please enter all the required information", vbCritical, "Mising Information"ElseIf Not IsNumeric(Me.txtCapacity.Text) Then

    MsgBox "CAPACITY:Enter Numeric values only! ", vbCritical, "Invalid Data Type"Me.txtCapacity.SetFocusMe.txtCapacity.Text = ""ElseIf Not IsNumeric(Me.txtCapacity.Text) ThenMsgBox "Capacity can only be Numeric", vbCritical, "Invalid Data Type"ElseIf IsNumeric(Me.txtHostelName.Text) ThenMsgBox "Please Enter Valid Hostel Name"Me.txtHostelName.SetFocusMe.txtHostelName.Text = ""Else

    dBaseConnect

    Set rsconn = New ADODB.Recordset

    With rsconn.CursorLocation = adUseClient.LockType = adLockOptimistic.Source = "select * from Hostel2".ActiveConnection = dbase

    .Open

    On Error Resume Next.AddNew

    !HostelName = Me.txtHostelName!Prefix = Me.txtPrefix!HostelNickname = Me.txtNickname!gender = Me.cbogender!capacity = Me.txtCapacity.UpdateMsgBox "Records successfully Saved", vbInformation, "Success!"

    End WithMe.txtCapacity.Text = ""Me.txtHostelName.Text = ""Me.txtNickname.Text = ""Me.txtPrefix.Text = ""Me.cbogender.Text = ""

  • 8/2/2019 Computerization of the Hostel Department-final Report

    88/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Set rsconn = NothingSet dbase = NothingEnd IfEnd Sub

    Private Sub cmdcreate_Click()

    End Sub

    Private Sub Command2_Click()Unload MeEnd Sub

    Private Sub Form_Load()On Error Resume Next

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2

    cbogender.AddItem "Male"cbogender.AddItem "Female"cbogender.AddItem "Mixed"

    End Sub

    Private Sub txtHostelName_Change()txtPrefix = Left$(txtHostelName, 1)' Command1.Caption = "Create Hostel '" & txtHostelName & "'"

    End Sub

    COMMAND BUTTON CANCELPrivate Sub Command2_Click()Unload MeEnd Sub

    EDIT HOSTEL FORM CODES

    FORM LOAD CODES

    Private Sub Form_Load()On Error Resume Next

  • 8/2/2019 Computerization of the Hostel Department-final Report

    89/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Me.txtPrefix.Enabled = FalseMe.txtPrefix.Enabled = FalseMe.txtNickname.Enabled = FalseMe.txtCapacity.Enabled = False

    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2End Sub

    COMMAND BUTTON UPDATE HOSTEL CODESPrivate Sub Command1_Click()On Error Resume Next

    If IsNumeric(Me.txtNickname.Text) Or txtNickname.Text = "" ThenMsgBox "Nick Name: Enter Valid Nick Name", vbCritical, "Invalid Data Type - HMS"

    txtNickname.SetFocusElseIf Not IsNumeric(Me.txtCapacity.Text) Or Me.txtCapacity.Text = "" ThenMsgBox "Capacity: Enter Valid data type-HMS", vbCritical, "Invalid Data type-HMS"txtCapacity.SetFocusElseIf IsNumeric(Me.txtgender.Text) Or Me.txtgender.Text = "" ThenMsgBox "Gender: Enter Valid Data Type", vbCritical, "Invalid Data Type-HMS"cbogender.SetFocusElse:dBaseConnectSet rsconn = New ADODB.Recordset

    If Me.txtCapacity.Text = "" ThenMsgBox "please hostel Capacity", vbInformation, App.titleElse

    Set rsconn = dbase.Execute("UPDATE Hostel2 Set Prefix='" & Me.txtPrefix.Text &"',HostelNickname='" & Me.txtNickname.Text & "',gender='" & Me.txtgender.Text &"',capacity='" & Me.txtCapacity.Text & "' where HostelName='" &Me.cboHostelName.Text & "'")With rsconn

    .CursorLocation = adUseClient

    .LockType = adLockOptimistic

    .Source = "select * from Hostel2 "

    .ActiveConnection = dbase

    .Open

    End With

    rsconn.Update

  • 8/2/2019 Computerization of the Hostel Department-final Report

    90/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    MsgBox "record successfully updated", vbInformation, "edit details"

    End IfEnd IfMe.txtPrefix.Text = ""

    Me.txtgender.Text = ""Me.txtCapacity.Text = ""Me.txtNickname.Text = ""Set rsconn = Nothing

    Set dbase = Nothing

    End Sub

    COMMAND BUTTON DELETE CODES

    Private Sub cmddelete_Click()On Error Resume Next

    dBaseConnectSet rsconn = New ADODB.Recordset

    Dim sql As String

    sql = "delete * from Hostel2 where HostelName='" & Me.cboHostelName.Text & "'"rsconn.Open sql, dbase

    MsgBox "Records Successfully deleted", vbInformation, "Delete Record"Me.txtCapacity.Text = ""Me.txtgender.Text = ""Me.txtNickname.Text = ""Me.txtPrefix.Text = ""Unload Me

    'Me.cboHostelName.AddItem (rsconn!HostelName)

    Set rsconn = NothingSet dbase = NothingEnd Sub

  • 8/2/2019 Computerization of the Hostel Department-final Report

    91/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    FORM SEARCH CODES

    FORM LOAD CODESPrivate Sub Form_Load()

    With frmsearch.Top = (Screen.Height - .Height) / 2.Left = (Screen.Width - .Width) / 2End With

    End Sub

    COMMAND BUTTON SEARCHPrivate Sub cmdsearch_Click()

    'On Error Resume NextIf Me.txtreg.Text = "" Then

    MsgBox "Enter Registration Number to Search!!", vbCritical, "Empty -HMS"Me.txtreg.SetFocusExit SubEnd IfdBaseConnectSet rsconn = New ADODB.Recordset

    Dim sql As String

    sql = "select * from student where RegistrationNo='" & Me.txtreg.Text & "'"rsconn.Open sql, dbaseIf Not rsconn.EOF ThenDo Until rsconn.EOFWith SearchSet .DataSource = rsconn.DataMember = rsconn.DataMember.Show vbModalEnd Withrsconn.MoveNextLoopEnd IfUnload Me

    Set rsconn = Nothing

  • 8/2/2019 Computerization of the Hostel Department-final Report

    92/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    Set dbase = Nothing

    End Sub

    COMMAND BUTTON CANCEL

    Private Sub cmdexit_Click()

    Unload Me

    End Sub

    FORM UPDATE HOSTEL FEE

    FORM LOAD CODES

    Private Sub Form_Load()

    On Error Resume Next

    MsgBox "This Form is Under Construction", vbInformation, "Hostel Management

    System"

    'minimizes data window

    'frmdata.WindowState = 1

    'txtnewfee.Locked = False

    'positions update window at the center of

    'screen

    With frmupdate

    .Top = (Screen.Height - .Height) / 2

    .Left = (Screen.Width - .Width) / 2

    End With

    'cmdexitform.Enabled = False

  • 8/2/2019 Computerization of the Hostel Department-final Report

    93/113

    DIT 077

    IT PROJECT

    ITE/D/15/10Amugada Stephen Ambani

    [email protected]

    'cmdcancel.Enabled = True

    End Sub

    Private Sub Combo1_GotFocus()