You are on page 1of 232

1

Chapter 1

THE PROBLEM AND ITS BACKGROUND

This chapter presents the introduction, background of the study,

theoretical framework, conceptual framework, significance of the study, scope

and limitation of the study and definition of terms.

Introduction

Some of the companies or establishments have accepted the controlling

system that enables the facilitator to just operate their electrical maintenance that

lessen the hour of work by turning it on/off manually of the system. It is a must

that the University or other organization had this kind of wiring control system for

its advancement and safety.

One of the most essential technologies in the world is the appliances. It is

used by homes, facilities and also the Universities all over the world. Controlling

is a must and a convenient option to everybody.

This development, the researchers believe that it manages processes in

industrial workplace. It will reduce human errors and processing time, thus it can

boost productivityand will ultimately save a lot of time. Therefore, it has become

more necessary for common man to automate their homes or buildings to control

electrical appliances from faraway places.

There are some instances where a facilitator accidentally forgets to close

an appliance left running and had caused an electric malfunction or short

circuiting then led it into a massive fire. Moreover, safety of buildings from
2

dangers like short circuiting can also be addressed using the Appliance Wiring

Control System. Having an appliance wiring control system is much more helpful

than just having a breaker to shut all electric currents flowing all at once. In the

long run Appliance Wiring Control System will much more help in saving time,

saving money, Facility Maintenance and Security and also in making lives easy.

The System can also help the campus to prevent an accident that can

cause a dangerous effect to the students, faculty and staffs.

Considering these factors, the researchers were opted to conduct the

study development and evaluation of Appliance Wiring Control System for the

campus. The researchers believe that the study will of big help for the safety of

the faculty, staffs, students, facility maintenance staffs as well as the building

itself.

Background of the Study

As stated in the Part I Section 2 of Republic Act 8792 “Electronic

Commerce Act of 2000” that:

The State recognizes the vital role of information and


communication technology in nation building. The need to create
and information friendly environment which supports and ensures
the availability diversity and affordability of ICT products and
services, the primary responsibility of the private sector in
contributing investments and services in telecommunication and
information technology; the need to develop, with appropriate
training programs and institutional policy changes, human
resources for the information technology age. 1

In this age of computers and IT (Information Technology), the internet and

other electronic means of interchange are used worldwide for various


3

undertakings- both commercial and non-commercial. This rapid development of

information and communication technologies and the growing number of

transactions accomplished through electronic means.

Technology has advanced so much in the last decade or two that it has

made life more efficient and comfortable. The comfort of being able to take

control of devices from one particular location has become imperative as it saves

a lot of time and effort. Therefore there arises a need to do so in a systematic

manner which will be implemented in the proposed system. The system is an

extended approach to automating a control system. With the advancement and

breakthrough in technology over the years, the lives of people have become

busier than before. With the adoption of this system, we can gain control over

certain things that require constant attention.

The application of this system comes in handy when people who forget to

do simple things such as turn ON or OFF devices at their homes or at their

offices. They can now do so without their presence by the transmission of simple

commands from the computer. This appliance control system does assistance to

the facilitators to monitor a real time update of the running appliance, without

even looking at the appliance directly by the help of the computer. It also helps in

the on and off of the appliances which may help for the facilitators to shut it in a

specific time whether the facilitator is in or way out of the University.

The primary objective of the Act is to provide a secure legal framework

and environment for electronic commerce. It seeks to protect the integrity of

electronic documents and electronic signatures as well as the transmission and


4

communication as to build and ensure the trust and reliance on electronic

transactions.

Nowadays, Technology continues to improve more and more to make

people’s life easier, efficient and comfortable. The comfort of being able to take

control of devices from one particular location in which it saves a lot of time and

effort in which connects to the proposed system that the researchers will do.

According to Wikipedia, control system is a device, or set of devices, that

manages, commands, directs or regulates the behaviour of other devices or

systems. Industrial control systems are used in industrial production for

controlling equipment or machines.2

It shows that control system has a lot of benefits that will help people to

make things easier in which in line with the system of the researchers, people

can save energy, time and efforts to do such thing regarding on the appliance

wiring control system.

According to Kim et al, Home appliance control system is controlled either

by a cell phone or a by palm top or by a PC. They are connected either through

wireless application protocol (WAP), the Internet, or intranet. It controls various

appliances such as a microwave, TV etc. The HACS system receives commands

from remote devices that are manipulated by user. The system in turn dispatch

commands to respective appliances that will perform the actions. HACS is

responsible for keeping track of the states of the devices. If something goes

wrong, it will notify the user by sending messages back to the remote devices as

well as emergency department if necessary. 3


5

This Home appliance control system relates to the studies of the

researcher in which it does assistance to the facilitators to monitor a real time

update of the running appliance, without even looking at the appliance directly by

the help of the computer. It also helps in the on and off of the appliances which

may help for the facilitators to shut it in a specific time whether the facilitator is in

our way out of the University.

Arduino is an open-source prototyping platform based on easy-to-use

hardware and software. Arduino boards are able to read inputs - light on a

sensor, a finger on a button, or a Twitter message - and turn it into an output -

activating a motor, turning on an LED, publishing something online. You can tell

your board what to do by sending a set of instructions to the microcontroller on

the board. To do so you use the Arduino programming language (based on

Wiring), and the Arduino Software (IDE), based on Processing. 4

The hardware Arduino uses to control the ON and OFF of the devices that

operate the Voltage Command to Pins reads from the serial port and routes of

the voltage commands to the appropriate pins.

A microcontroller (or MCU, short for microcontroller unit) is a small

computer (SoC) on a single integrated circuit containing a processor core,

memory, and programmable input/output peripherals. Program memory in the

form of Ferroelectric RAM, NOR flash or OTP ROM is also often included on

chip, as well as a typically small amount of RAM. Microcontrollers are designed

for embedded applications, in contrast to the microprocessors used in personal


6

computers or other general purpose applications consisting of various discrete

chips.5

Relays are switches that open and close circuits electromechanically or

electronically. Relays control one electrical circuit by opening and closing

contacts in another circuit. As relay diagrams show, when a relay contact is

normally open (NO), there is an open contact when the relay is not energized.

When a relay contact is Normally Closed (NC), there is a closed contact when

the relay is not energized.6

Relays are normally applied to control a high current or high-voltage circuit

with a low-current signal, detect and isolate faults on transmission and

distribution lines by opening and closing circuit breakers, and perform time delay

functions.

According to E.M Cooley, The programmable logic controller is also in

communication with the first generator to selectively control the first generator in

response to the input information. The programmable logic controller also

controls load bearing equipment that consumes the power provided via the utility

power line and from the first generator. A process of managing power usage of a

plant comprises receiving energy pulses; determining actual kWh being delivered

by a utility company, during a demand interval; comparing the actual kWh to a

preset kWh amount to determine whether actual kWh is greater than the preset

kWh amount; and, if the actual kWh is greater than the preset kWh amount, then

reducing the amount of power consumed by load bearing equipment. Also, if the
7

actual kWh is greater than the preset kWh amount, then the process increases

power generated a generator.7

According to S.K Khadke, by designing the Android user interface and

Home information centre, home appliance control system based on the Android

phone can be designed. It has combined android client, network transmission,

and wireless switch, home information center to form a complete system, and the

whole system works normally. Identifying message commands and wireless

encoding are the two major tasks for home information center. Android phone

have advantages such as humane interface, customizable and extendible

applications and android phone is easy to carry so on. By constantly improving

the control function, android phone allows us anytime, anywhere to control any

device, and finally realizes the highly intelligent home. 8

According to Rajeev Piyare and Seong Ro Lee of Department of

Information Electronics Engineering, Mokpo University, “Home automation

system is divided into two parts: server application software and microcontroller

firmware. The server application software is a library implementation of a micro

Web-server running on Arduino Uno using the Ethernet shield. To successfully

communicate between remote user and the Home Gateway, configuration stage

and sensor/actuator control stage layers have been implemented on the

Arduino.” 9

Another innovation that is comparable to the group’s study is the PC-

Based Appliance Control System through SMS developed by former students of

Mapua Institute of Technology. Based on the authors (Babierra, Arnel L.; Basa,
8

Erwin T.; Bitiu, 4 Jr. Palermo D.; Cruz, Rommel G. ;Layug III, Joel R.; and

Regaldo, Dante C.A.), “through the use of this system, one can automatically

control the status of the appliances even if they are away from home. This project

is a pc-based controller which allows users to switch six home appliances using

text message commands with the program created using Visual Basic 4 and

incorporates SPDT relays to switch the appliances.” 10

This system is similar to the group’s project design due to the fact that it

helps someone to turn their appliances ON or OFF. However there are difference

between the said study which allows controlling appliances using text message

commands and the System that the researchers made which can control

appliances through the help of personal computers.

Theoretical Framework

In engineering and mathematics, control theory deals with the behaviour

of dynamical systems. The desired output of a system is called the reference,

when one or more output variables of a system need to follow a certain reference

over time.

A controller manipulates the inputs to a system to obtain the desired

effect on the output of the system. Rapid advances in digital system technology

have radically altered the control design options. It has become routinely

practicable to design very complicated digital controllers and to carry out the

extensive calculations required for their design.


9

These advances in implementation and design capability can be obtained

at low cost because of the widespread availability of inexpensive and powerful

digital processing platforms and high-speed analog IO devices. 11

The principle applies on the design of the project, wherein the arduino Uno

board operates to control the switch on/off in terms of controlling the system. The

programs in the database perform its necessary operation in order to monitor and

process.

The operation of the control system is periodically checked to verify proper

operation. If a control system fails, the operator in determining if the system is

operating properly and which actions are required to maintain the system in safe

and fully working condition.

Conceptual Framework

The conceptual model of the study anchored Coomb’s System Approach

which consists of input, process and output.

The first box is the input consists of ideas from related literatures and

studies, data of the University facilities, and generating Arduino software

The second box is the process contains and printing. This also includes

the testing of the system, administering of Questionnaire Checklist, Evaluation,

Analysis and Interpretation of data gathered.

The third box is the output that shows the outcome which turn on/off the

appliance and the Developed Appliance Control System of University of Rizal

System Cainta, campus.


10

The arrows represent the interrelationship of the input, process and the

output of the study.

The feedback stands for the comments and suggestions of the

respondents for the improvement of the system.


11

INPUT PROCESS OUTPUT

 Related  Encoding
Literatures
and Studies  Testing of the
System,
 Data of the
University  Administering Developed and
Facilities of Evaluated
Questionnaire Appliance Wiring
Checklist Control System
 Arduino
Software  Evaluation,
Analysis and
 Questionnaire Interpretation
Checklist of Data
Gathered

Feedback

Figure 1

Conceptual Model Showing the Development and Evaluation of


Appliance Wiring Control System
12

Objectives of the Study

The purpose of this study was to develop Appliance Wiring Control

System.

Specifically, the study aimed to:

1. To design and develop Appliance Wiring Control System.

2. To Evaluate the Level of Acceptability of the Developed Appliance Wiring

Control System. As evaluated by the four groups of Respondents in terms

of;

2.1 Accuracy;

2.2 Applicability;

2.3 Workability

2.4 Efficiency; and

2.5 Reliability.

3. To measure the significant difference on the level of acceptability of the

Developed Appliance Wiring Control System of URS Cainta as Evaluated

by the four groups of Respondents in terms of the aforementioned

variables

4. To gather suggestions and recommendations for further improvement of

the system.

Hypothesis

There is no significant difference on the level of acceptability of the

Developed Appliance Wiring Control System of URS Cainta as Evaluated by the


13

four groups of respondents.

Scope and Limitations of the Study

The study focused on the development of Appliance Wiring Control

Systemduring the Academic Year 2016 – 2017.

The study aimed to create a system where the students, faculty and staffs

can ensure their safety in using the Facilities of the University. Study is confined

to develop a system that automatically controls the electronic appliances.

Through a help of the Arduinouno board, the system and the data base that is

made by the researchers, a person who manage the maintenance of the

university can easily control (on/off) the working appliance or can monitor on

which room the appliance is working, when the room is not being used.

There were a total of 12 respondents who were the I.T experts,

Electronics expert, Electrical expert and the Administrators.They were selected

through purposive sampling technique.

An adopted and modified questionnaire checklist as the main instrument in

data gathering which consist of five (5) variables, the Accuracy, Applicability,

Workability, Efficiency and Reliability.

Descriptive and Developmental research methods were used in the study

together with the appropriate statistical tools such as the Mean, Standard

Deviation, ANOVA and Scheffes Test.

The study was limited on setting the On / Off of an appliance and was

done in one room in the first floor of the URS Cainta Campus.
14

Significance of the Study

The outcome of this study would help for the following:

University,This system would be a great help for the university because it

can avoid possible electrical problems/accidents.

Students,Through this system they are ensured that they are in the safe

learning environment.

FutureResearchers, This will serve as a reference or guide to anyone

else who will pursue the same study and may give some information in the study

they plan to undertake.

The Maintenance Staff, This will help them in monitor running appliances

easier and can help make their work more efficient.

Definition of Terms

For the further understanding of the study, following terms were

operationally and conceptually defined:

Accuracy, This refers to the ability of the Developed and Evaluated

Appliance Control System to work or perform without making mistakes

Applicability, This refers to the applicability of the Developed and

Evaluated Appliance Control System on how useful it is in a given situation.

Appliance, This refers to a device or piece of equipment designed to

perform a specific task which is used in the study.

Efficiency, The state or quality of being efficient of the study or able to

accomplish something with the least waste of time and effort.


15

Hardware, is a comprehensive term for all the physical parts of a

computer, as distinguished from the data it contains or operates on, and the

software that provides instructions for the hardware to perform specific tasks. 12

Reliability, An attribute of any system that consistently produces the same

results, preferably meeting or exceeding its specifications.

Software, Is a generic term for organized collection of computer data and

instructions, often broken into two major categories: system software that

provides the basic non-task-specific functions of the computer and application

software which is used by users to accomplish specific tasks. 13

Wiring, A system of wires providing electric circuits for a device or

building. This Refers to The act of attaching, connecting, or installing electric

wires.

Workability, Refers to being able to successfully use the Developed and

Evaluated Appliance Control System.


16

Notes

1
Joan M. Padilla, An Overview of IT’s (Information Technology) Impact on the
Philippine Legal System, 2001
2
Control System, Retrieved on Aug. 30, 2016 from
https://en.wikipedia.org/wiki/Control_system
3
Duk-Jin Kimet. al, Home Appliance Control SystemOctober 12, 2006
4
Arduino, Retrieved on Sept. 10, 2016 from
https://www.arduino.cc/en/Guide/Introduction
5
Micro-Controller, Retrieved on Sept. 10, 2016 from
https://en.wikipedia.org/wiki/Microcontroller
6
Relay, Retrieved on Sept. 10, 2016 from
http://www.galco.com/comp/prod/relay.htm
7
Edwin Martin Cooley, et.al Power Control Systems and Processes Publication
numberUS6157874 A December 2000
8
Sachin KishorKhadke, Home Appliances Control System Based On Android
Smartphone Pune, India
9
Rajeev Piyare and Seong Ro Lee, Smart Home-Control and Monitoring
System Using Smart PhoneDepartment of Information Electronics
Engineering, Mokpo National University
10
Catherine A. Abayariet. alDesign of Home Appliance Remote Monitoring
and Switching System Using SMSMapua Institute of Technology March
2008
11
S. SimrockControl theory DESY, Hamburg, Germany
12
Software Retrieved on August 31, 2016
http://www.openprojects.org/software-definition.htm
13
Hardware Retrieved on August 31, 2016
http://www.openprojects.org/hardware-definition.htm
17

Chapter 2

RESEARCH METHODOLOGY

This chapter presents the research method, sampling technique, setting of

the study, subject of the study, source of data, research procedure, project

design and statistical treatment.

Research Design

This study used descriptive and developmental methods of research.

Descriptive research, also known as statistical research, describes data

and characteristics about population or phenomenon being studied. However it

does not answer questions about e.g.: how, when, why the characteristics

occurred, which is done under analytic research.

Descriptive research designis type of research describes what exists and

may help to uncover new facts and meaning. The purpose of descriptive

research design is to Observe, describe and documentaspects of a situation as it

naturally occurs. This involves the collection of data that will provide an account

or description of individuals, groups or situations. Instruments we use to obtain

data in descriptive studies includequestionnaires, interviews (closed

questions)and observation (checklists, etc.).1

This explained the information gathered from a population that can be

helpful for the development of a study. It is a research to know more about the

subject of the study which is the Staffs of University of Rizal System Cainta
18

Campus and also the method they use to have those important gathered data

that could help the researchers.

The study includes the survey and the fact finding inquiries of different

kinds of variables .There are some valid concerns about the statistical validity, as

long as the limitations are understood by the researchers.

Developmental method of research is the systematic study of designing,

developing, and evaluating instructional programs, processes and product must

meet criteria of internal consistency and effectiveness. Developmental method of


2
research is particularly important in the field of instructional technology.

The Researchers developed their own system that involves the designing

and physical appearance of the said study. The method that the researchers

focused is more on the impact of the product on the learner or the organization.

Sampling Technique

In choosing the respondents of the study the researchers used purposive

and convenience sampling techniques.

Purposive sampling represents a group of different non-probability

sampling techniques. It is also known as judgmental,

selective or subjective sampling method, purposive sampling relies on

the judgement of the researcher when it comes to selecting the units (e.g.,

people, cases/organisations, events, pieces of data) that are to be studied.

Usually, the sample being investigated is quite small, especially when compared

with probability sampling techniques.3


19

Convenience sampling is a type of non-probability sampling technique.

Non-probability sampling focuses on sampling techniques that are based on the

judgement of the researcher [see our article Non-probability sampling to learn

more about non-probability sampling]. This article explains (a) what convenience

sampling is and (b) the advantages and disadvantages (limitations) of

convenience sampling.4

Setting of the Study

The study was conducted at the University of Rizal System Cainta

Campus during the school year 2016-2017. It is located at Gate 1, Karangalan

Drive, Karangalan Village, and Brgy. San Isidro, Cainta Rizal.

The University of Rizal System Cainta envisioned: “The leading university

in human resource development, knowledge and technology generation and

environmental stewardship”.

The university mission is “University of Rizal System Cainta is committed

to nurture and produce upright and competent graduates and empowered

community through relevant and sustainable higher professional and technical

instruction, research, extension and production services

Today URS Cainta has become a complete college with Technology as its

flagship program catering up to four year level. The school community

continuously seeks to keep pace with other schools to meet the difficult and

demanding challenges of quality education based on new developments,

researches and discoveries in various disciplines. To further strengthen its

presence in the Province of Rizal, URS Cainta located to a better site that will
20

Enable them to more efficiently meet the services needs and requirements of the

community.

Figure 2

University of Rizal System Cainta


21

Figure 3

Location Map of University of Rizal System Cainta Campus

Subject of the Study

This study was focused on the development of an Appliance Wiring

Control System. The developed system was designed to automatically control

the electronic appliances. It also aimed to create a system where the students,

faculty and staffs can ensure their safety in using the facilities of the campus.

Through this system, the staff can monitor on whom room does the

appliance accidentally forgot to turn off; it can stop consuming electricity and

possible accidents due to the running appliances

The respondents of the System would be (10) IT experts, (13) Electronics


22

expert, (14) Electrical expert and (3) Administrator. They were selected as the

respondents of the study since they were knowledgeable in the developed

output.

Sources of Data

The researchers used an adopted questionnaire checklist as the main

data gathering tool in the evaluation of the developed Appliance Wiring Control

System.

The questionnaire includes statement / questions pertaining to determine

the level of variables; Accuracy, Applicability, Workability, Efficiency, and

Reliability

The researchers also used the internet and other unpublished study as the

secondary sources of the data that can also help the study to be more accurate.

The scale used in the evaluation of the system is shown in table1.

Table 1

Five-Point Likert Scale

SCALE VERBAL INTERPRETATION RANGE


5 Highly Acceptable 4.20-5.00
4 Acceptable 3.40-4.19
3 Moderately Acceptable 2.60-3.39
2 Less Acceptable 1.80-2.59
1 Not Acceptable 1.00-1.79

Research Procedure

The procedure of the study started by coming up with three proposed


23

titles and the panel approved the title "Development and Evaluation of the

Appliance control Wiring System".

The researchers started to gather raw data by reading reference books as

their starting point. The researchers also gathered information from the internet,

unpublished thesis, dissertation and literature of some authors related to the

study.

The researchers then began to develop their chapters 1 and 2 along with

the series of consultations with their adviser and the critic reader for the

improvement of the system and the manuscript. The researchers also sought

advices from the panel members. After the development of chapters 1 and 2 and

their flow chart/system, they prepared and successfully defended their study on

the month of September 2016.

Project Design

The project design deals with the system flowchart which is defined as a

diagram representing the logical sequence in which combination of steps or

operation is to be performed and system algorithm which pertains to a list of

instructions for carrying outcome process step by step. Hardware, software

requirements and statistical treatment are also includes in the design.


24

Flowchart

Start

A
HOME
A.Register
B.Log In

Y Register Input all information


SAVE
If = A Y B

N
Y
N
Y
If = B A

Y B
Y
Input User and Password

Log In

N
Are the user is Valid? Error Messaged
Y
B

Y C
Y
MAIN
MENU
A. Output
Switch
B. Log out

2
25

Y D
Y
If = A OUTLET SWITCH
I. ON
II. OFF

Y
N If = I Y SWITCH ON
Y INDICATOR GREEN D
N Y
Y If = II Y SWITCH OFF
INDICATOR RED D
N
Y
C
Y
Y
If = B END
Logout

N
Y

C
26

Algorithm

1. Start

2. Input Username and Password

3. Log In

3.1 log in failed

3.2 Back to Log in form

4. Main Menu

5. Profile

5.1 Profile Information

5.2 Back to main menu

6. Switch Monitoring

6.1 First Floor

6.2 Second Floor

6.3 Third Floor

6.4 Fourth Floor

6.5 Back to main menu

7. Switching Schedule

6.1 First Floor

6.2 Second Floor

6.3 Third Floor

6.4 Fourth Floor

6.5 Back to main menu

7. Log Out

8. End

Hardware and Software Requirements


27

The hardware requirements of the Appliance Control system of University of Rizal

System - Cainta Campus is Dual-core processor, 2GB RAM, 512MB of video card, 80GB

hard disk, monitor (at least 1366 x 768 resolutions) mouse, keyboard and Arduino Uno board.

The software requirements are Net framework 4.0, Arduino Software, at least

Windows XP Operating System

Statistical Treatment

The following statistical treatments were utilizedin this study:

1. To determine the level of acceptability of the developed Appliance

Wiring Control as evaluated by the four groups of respondents in terms

of Accuracy, Applicability, Workability, Efficiency, and Reliability, the

mean and the standard deviation were used.

2. To determine if there is a significant difference on the level of

acceptability of the Developed Appliance Wiring Control System of

URS Cainta as Evaluated by the four groups of Respondents. of the

aforementioned variables, the ANOVA were used.


28

NOTES

1
Descriptive Research Design, Retrieved on Aug. 30, 2016 from
http://www.health.herts.ac.uk/immunology/Web%20programme%20-
%20Researchhealthprofessionals/descriptive_research.htm
2
Developmental Method, Retrieved on Aug. 30, 2016 from
http://en.wikipedia.org/wiki/develop ental-method
3
Purposive sampling, Retrieved on Aug. 30, 2016 from
http://dissertation.laerd.com/purposive-sampling.php
4
Convenience sampling, Retrieved on Aug. 30, 2016 from
http://dissertation.laerd.com/convenience-sampling.php
29

Chapter 3

PRESENTATION ANALYSIS AND INTERPRETATION OF DATA

This chapter includes the development of the program flowchart, program

algorithm, program listing, program output, user’s manual and the level of

acceptability of the developed system.

Development of the System

In the development of the system, the researchers used VB 6.0 for the

designing as well coding of the system, C++ for the Arduino coding Microsoft

Access for the database as software and. To know the level of acceptability of

the program the researchers used descriptive and developmental method for

study.

To run the developed Appliance Wiring Control System, Visual Basic 6.0

and MS Access should be installed.


30

Program Flowchart

START

INPUT USERNAME AND PASSWORD

LOG IN

N
VALID? ERROR MESSAGE
A

B
Y

MAIN MENU

A. ON/OFF SWITCH
B. SWITCH SCHEDULING
C. ON/OFF LOG
D. ADMIN PANEL
E. SUB MENU

2
31

C
Y
IF = A ON/OFF SWITCH

I. FIRST FLOOR
II. SECOND FLOOR
III. THIRD FLOOR
IV. FOURTH FLOOR

N FIRST FLOOR
D

Y I. 101
II. 102
IF = I III. 103
IV. 104
V. 105
VI. 1F CR
VII. 1F HALLWAY
N VIII. CLINIC

SECOND FLOOR
E

Y I. 201
II. 202
III. 203
IF = II IV. 204
V. 205
VI. 2F CR
VII. 2F HALLWAY
VIII. GUIDANCE OFFICE
N IX. MULTIPURPOSE ROOM

3
21
8
32

THIRD FLOOR
F
Y
I. 301
II. 302
IF = III III. 303
IV. 304
V. 305
VI. 3F CR
N
VII. 3F HALLWAY
VIII. RESEARCH OFFICE

13

FOURTH FLOOR
G
Y
I. 401
II. 402
IF = IV III. 403
IV. 404
V. 405
VI. 4F CR
N
VII. 4F HALLWAY
VIII. CHRONICLER

17
B
33

Y
IF = I 101

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
N

Y
IF = II 102

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
5 N

D
34

Y
IF = III 103

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
N

Y
IF = IV 104

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
6 N

D
35

Y
IF = V 105

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
N

Y
IF = VI 1F CR

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
7 N

D
36

Y
IF = VII 1F HALLWAY

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
N

Y
IF = VIII CLINIC

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN D
N
Y
IF = B SWITCH OFF
INDICATOR = RED D
C N

D
37

Y
IF = I 201

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
N

Y
IF = II 202

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
9 N

E
38

Y
IF = III 203

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
N

Y
IF = IV 204

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
10 N

E
39

10

Y
IF = V 205

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
N

Y
IF = VI 2F CR

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
11 N

E
40

11

Y
IF = VII 2F HALLWAY

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
N

Y
GUIDANCE OFFICE
IF = VIII
A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
12 N

E
41

12

Y
MULTIPURPOSE ROOM
IF = IX
A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN E
N
Y
IF = B SWITCH OFF
INDICATOR = RED E
N

E
C
42

13

Y
IF = I 301

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
N

Y
IF = II 302

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
14 N

F
43

14

Y
IF = III 303

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
N

Y
IF = IV 304

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
15 N

F
44

15

Y
IF = V 305

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
N

Y
IF = VI 3F CR

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
16 N

F
45

16

Y
3F HALLWAY
IF = VII
A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
N

Y
IF = VIII RESEARCH OFFICE

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN F
N
Y
IF = B SWITCH OFF
INDICATOR = RED F
C N

F
46

17

Y
IF = I 401

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
N

Y
IF = II 402

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
18 N

G
47

18

Y
IF = III 403

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
N

Y
IF = IV 404

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
19 N

G
48

19

Y
IF = V 405

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
N

Y
IF = VI 4F CR

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
20 N

G
49

20

Y
4F HALLWAY
IF = VII
A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
N

Y
IF = VIII CHRONICLER

A. ON
B. OFF
N
Y
IF = A SWITCH ON
INDICATOR = GREEN G
N
Y
IF = B SWITCH OFF
INDICATOR = RED G
C N

G
50

21

H
Y
SWITCH SCHEDULING

IF = B I. FIRST FLOOR
II. SECOND FLOOR
III. THIRD FLOOR
IV. FOURTH FLOOR

Y I SETUP FIRST FLOOR SCHEDULING

IF = I A. SETUP
B. EDIT SETUP

IF = A
SETUP SAVE I
N
Y

IF = B
EDIT SAVE I

25 22 H
51

22

Y J SETUP SECOND FLOOR SCHEDULING

IF = II A. SETUP
B. EDIT SETUP

IF = A
SETUP
SAVE J
N

IF = B
EDIT
SAVE J
N

23 H
52

23

Y
K
SETUP THIRD FLOOR SCHEDULING

IF = III A. SETUP
B. EDIT SETUP

IF = A
SETUP
SAVE K
N

IF = B
EDIT
SAVE K
N

24 H
53

24

Y
L
SETUP FOURTH FLOOR SCHEDULING

IF = IV A. SETUP
B. EDIT SETUP

IF = A
SETUP
SAVE L

IF = B
EDIT
SAVE L

B H
54

25

IF = C ON / OFF LOGS
B

M
ADMIN PANEL
Y
IF = D I. USERS ACCOUNT
II. DELETE ALL ON/OFF LOGS
III. SETUP OUTPUTS DELAY
IV. SETUP DEVICE CONNECTION
V. FACTORY DATA RESET

30 26
55

26

USERS ACCOUNTS
IF = I
A. ADD ACCOUNT
B. EDIT ACCOUNT
C. DELETE ACCOUNT

IF = A
ADD ACCOUNT N
SAVE

Y
IF = B
EDIT ACCOUNT N
SAVE

N
Y

IF = C
DELETE N

27 M
56

27

O
Y
DELETE LOGS?
IF = II
A. YES
B. NO
N

Y
IF = A
DELETE O

Y
IF = B
O

28 M
57

28

Y P
SETUP OUTPUTS DELAY
IF = III
A. ACTIVATE
B. DEACTIVATE

IF = A SETUP ACTIVATE
P

IF = B DEACTIVATE P

29 M
58

29

Y
SETUP DEVICE CONNECTION
IF = IV
SAVE M

Q
Y
FACTORY DATA RESET
IF = V
A. OK
B. CANCEL
N
Y
IF = A CONFIRM RESETING
Q

N Y

IF = B
M
N

B Q
59

30

R
Y SUB MENU
I. POWER RESTORE
IF = E II. SHOW NOTIFICATION BAR
III. ABOUT AWCS
IV. LOGOUT

Y RESTORE POWER?
IF = I A. YES
B. NO

N
Y
IF = A RESTORING POWER
B

N
Y
IF = B
R
N
B

Y
IF = II SHOW NOTIFICATION BAR

N
Y
IF = III ABOUT AWCS
B

N
Y
IF = IV
END

N
B B
60

Program Algorithm

1. Start
2. Input Username and Password
3. Login
3.1 Login Failed
3.2 Back to Login Form
4. Main Menu
4.1 On/Off Switch
4.1.1 First Floor
4.1.1.1 Room 101
4.1.1.1.1 Output 1 Switch
4.1.1.1.2 Output 2 Switch
4.1.1.1.3 Output 3 Switch
4.1.1.1.4 Output 4 Switch
4.1.1.1.5 Edit Output Label

4.1.1.2 Room 102


4.1.1.2.1 Output 1 Switch
4.1.1.2.2 Output 2 Switch
4.1.1.2.3 Output 3 Switch
4.1.1.2.4 Output 4 Switch
4.1.1.2.5 Edit Output Label

4.1.1.3 Room 103


4.1.1.3.1 Output 1 Switch
4.1.1.3.2 Output 2 Switch
4.1.1.3.3 Output 3 Switch
4.1.1.3.4 Output 4 Switch
4.1.1.3.5 Edit Output Label

4.1.1.4 Room 104


4.1.1.4.1 Output 1 Switch
4.1.1.4.2 Output 2 Switch
4.1.1.4.3 Output 3 Switch
4.1.1.4.4 Output 4 Switch
4.1.1.4.5 Edit Output Label

4.1.1.5 Room 105


4.1.1.5.1 Output 1 Switch
4.1.1.5.2 Output 2 Switch
4.1.1.5.3 Output 3 Switch
4.1.1.5.4 Output 4 Switch
4.1.1.5.5 Edit Output Label
61

4.1.1.6 First Floor Comfort Room


4.1.1.6.1 Output 1 Switch
4.1.1.6.2 Output 2 Switch
4.1.1.6.3 Output 3 Switch
4.1.1.6.4 Output 4 Switch
4.1.1.6.5 Edit Output Label

4.1.1.7 First Floor Clinic


4.1.1.7.1 Output 1 Switch
4.1.1.7.2 Output 2 Switch
4.1.1.7.3 Output 3 Switch
4.1.1.7.4 Output 4 Switch
4.1.1.7.5 Edit Output Label

4.1.2 Second Floor


4.1.2.1 Room 201
4.1.2.1.1 Output 1 Switch
4.1.2.1.2 Output 2 Switch
4.1.2.1.3 Output 3 Switch
4.1.2.1.4 Output 4 Switch
4.1.2.1.5 Edit Output Label

4.1.2.2 Room 202


4.1.2.2.1 Output 1 Switch
4.1.2.2.2 Output 2 Switch
4.1.2.2.3 Output 3 Switch
4.1.2.2.4 Output 4 Switch
4.1.2.2.5 Edit Output Label

4.1.2.3 Room 203


4.1.2.3.1 Output 1 Switch
4.1.2.3.2 Output 2 Switch
4.1.2.3.3 Output 3 Switch
4.1.2.3.4 Output 4 Switch
4.1.2.3.5 Edit Output Label

4.1.2.4 Room 204


4.1.2.4.1 Output 1 Switch
4.1.2.4.2 Output 2 Switch
4.1.2.4.3 Output 3 Switch
4.1.2.4.4 Output 4 Switch
4.1.2.4.5 Edit Output Label

4.1.2.5 Room 205


4.1.2.5.1 Output 1 Switch
4.1.2.5.2 Output 2 Switch
62

4.1.2.5.3 Output 3 Switch


4.1.2.5.4 Output 4 Switch
4.1.2.5.5 Edit Output Label

4.1.2.6 Second Floor Comfort Room


4.1.2.6.1 Output 1 Switch
4.1.2.6.2 Output 2 Switch
4.1.2.6.3 Output 3 Switch
4.1.2.6.4 Output 4 Switch
4.1.2.6.5 Edit Output Label

4.1.2.7 Second Floor Hallway


4.1.2.7.1 Output 1 Switch
4.1.2.7.2 Output 2 Switch
4.1.2.7.3 Output 3 Switch
4.1.2.7.4 Output 4 Switch
4.1.2.7.5 Edit Output Label

4.1.3 Third Floor


4.1.3.1 Room 301
4.1.3.1.1 Output 1 Switch
4.1.3.1.2 Output 2 Switch
4.1.3.1.3 Output 3 Switch
4.1.3.1.4 Output 4 Switch
4.1.3.1.5 Edit Output Label

4.1.3.2 Room 302


4.1.3.2.1 Output 1 Switch
4.1.3.2.2 Output 2 Switch
4.1.3.2.3 Output 3 Switch
4.1.3.2.4 Output 4 Switch
4.1.3.2.5 Edit Output Label

4.1.3.3 Room 303


4.1.3.3.1 Output 1 Switch
4.1.3.3.2 Output 2 Switch
4.1.3.3.3 Output 3 Switch
4.1.3.3.4 Output 4 Switch
4.1.3.3.5 Edit Output Label

4.1.3.4 Room 304


4.1.3.4.1 Output 1 Switch
4.1.3.4.2 Output 2 Switch
4.1.3.4.3 Output 3 Switch
4.1.3.4.4 Output 4 Switch
4.1.3.4.5 Edit Output Label
63

4.1.3.5 Room 305


4.1.3.5.1 Output 1 Switch
4.1.3.5.2 Output 2 Switch
4.1.3.5.3 Output 3 Switch
4.1.3.5.4 Output 4 Switch
4.1.3.5.5 Edit Output Label

4.1.3.6 Third Floor Comfort Room


4.1.3.6.1 Output 1 Switch
4.1.3.6.2 Output 2 Switch
4.1.3.6.3 Output 3 Switch
4.1.3.6.4 Output 4 Switch
4.1.3.6.5 Edit Output Label

4.1.3.7 Third Floor Hallway


4.1.3.7.1 Output 1 Switch
4.1.3.7.2 Output 2 Switch
4.1.3.7.3 Output 3 Switch
4.1.3.7.4 Output 4 Switch
4.1.3.7.5 Edit Output Label

4.1.3.8 Third Floor Research Development Room


4.1.3.8.1 Output 1 Switch
4.1.3.8.2 Output 2 Switch
4.1.3.8.3 Output 3 Switch
4.1.3.8.4 Output 4 Switch
4.1.3.8.5 Edit Output Label

4.1.4 Fourth Floor


4.1.4.1 Room 401
4.1.4.1.1 Output 1 Switch
4.1.4.1.2 Output 2 Switch
4.1.4.1.3 Output 3 Switch
4.1.4.1.4 Output 4 Switch
4.1.4.1.5 Edit Output Label

4.1.4.2 Room 402


4.1.4.2.1 Output 1 Switch
4.1.4.2.2 Output 2 Switch
4.1.4.2.3 Output 3 Switch
4.1.4.2.4 Output 4 Switch
4.1.4.2.5 Edit Output Label

4.1.4.3 Room 403


64

4.1.4.3.1 Output 1 Switch


4.1.4.3.2 Output 2 Switch
4.1.4.3.3 Output 3 Switch
4.1.4.3.4 Output 4 Switch
4.1.4.3.5 Edit Output Label

4.1.4.4 Room 404


4.1.4.4.1 Output 1 Switch
4.1.4.4.2 Output 2 Switch
4.1.4.4.3 Output 3 Switch
4.1.4.4.4 Output 4 Switch
4.1.4.4.5 Edit Output Label

4.1.4.5 Room 405


4.1.4.5.1 Output 1 Switch
4.1.4.5.2 Output 2 Switch
4.1.4.5.3 Output 3 Switch
4.1.4.5.4 Output 4 Switch
4.1.4.5.5 Edit Output Label

4.1.4.6 Fourth Floor Comfort Room


4.1.4.6.1 Output 1 Switch
4.1.4.6.2 Output 2 Switch
4.1.4.6.3 Output 3 Switch
4.1.4.6.4 Output 4 Switch
4.1.4.6.5 Edit Output Label

4.1.4.7 Fourth Floor Hallway


4.1.4.7.1 Output 1 Switch
4.1.4.7.2 Output 2 Switch
4.1.4.7.3 Output 3 Switch
4.1.4.7.4 Output 4 Switch
4.1.4.7.5 Edit Output Label

4.1.4.8 Fourth Floor Chronicler Room


4.1.4.8.1 Output 1 Switch
4.1.4.8.2 Output 2 Switch
4.1.4.8.3 Output 3 Switch
4.1.4.8.4 Output 4 Switch
4.1.4.8.5 Edit Output Label

4.2 Switch Scheduling


4.2.1 First Floor
4.2.1.1 Set up Time Schedule
4.2.2 Second Floor
65

4.2.2.1 Set up Time Schedule


4.2.3 Third Floor
4.2.3.1 Set up Time Schedule
4.2.4 Fourth Floor
4.2.4.1 Set up Time Schedule
4.2.5 Show Activated Schedule

4.3 On/Off Log


4.3.1 Show Operation Log
4.3.2 Refresh Logs

4.4 Admin Panel


4.4.1 Users Account
4.4.1.1 Add
4.4.1.2 Edit
4.4.1.3 Delete

4.4.2 Delete all on/Off Logs

4.4.3 Setup Outputs Delay

4.4.4 Setup Device Connection


4.4.4.1 Setup Connection/Edit Connection Setup
4.4.4.2 Activate/Deactivate
4.4.4.3 Device Manager
4.4.4.3.1 List of Available Ports
4.4.4.3.2 Refresh Port List
4.4.4.3.3 Arduino Com Port Identifier
4.4.4.3.4 Windows Device Manager
4.4.4.4 List of Rooms

4.4.5 Factory Data Reset


4.4.5.1 Ok Button
4.4.5.2 Cancel Button

4.5 Sub Menu


4.5.1 Power Restore
4.5.2 Show Notification
4.5.3 about AWCS
4.5.4 Log Out
5. End
66

Program Listing

Private Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal


lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub PlaySound(strFileName As String)
sndPlaySound strFileName, 1
End Sub
Private Sub Command3_Click()
MainMenu.Show
NotificationForm.Show
Me.Hide
End Sub

Private Sub Command4_Click()


SchedulingServer3F.Show
End Sub

Private Sub Form_Activate()


AccountType.Text = ""
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
AWCSLogin.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
End Sub

Private Sub Form_Unload(Cancel As Integer)


End
End Sub

Private Sub Image2_DblClick()


ControlPanel.Show
End Sub

Private Sub loginbtn_Click()


If Text1.Text = "" Then
MsgBox "Please enter your USERNAME", vbCritical, "Appliance Wiring Control System"
Text1.SetFocus
ElseIf Text2.Text = "" Then
MsgBox "Please enter your PASSWORD", vbCritical, "Appliance Wiring Control System"
Text2.SetFocus
Else
Image1.Visible = True
Timer2.Enabled = True
loginbtn.Enabled = False
loginbtn.Caption = "Please Wait..."
Information.Caption = ""
End If
End Sub
67

Private Sub Text3_KeyPress(KeyAscii As Integer)


If KeyAscii = 0 Then
Form1.Show
End If
End Sub

Private Sub Text1_GotFocus()


Information.Caption = "Enter your username."
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
loginbtn_Click
End If
End Sub

Private Sub Text2_GotFocus()


Information.Caption = "Enter your passsword."
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)


If KeyAscii = 13 Then
loginbtn_Click
End If
End Sub

Private Sub Timer1_Timer()


Command1.Caption = Val(Command1.Caption) + 1
If Command1.Caption = "1" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0000.jpg")
ElseIf Command1.Caption = "2" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0001.jpg")
ElseIf Command1.Caption = "3" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0002.jpg")
ElseIf Command1.Caption = "4" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0003.jpg")
ElseIf Command1.Caption = "5" Then
Information.Caption = "Loading System Files....."
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0004.jpg")
ElseIf Command1.Caption = "6" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0005.jpg")
ElseIf Command1.Caption = "7" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0006.jpg")
ElseIf Command1.Caption = "8" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0007.jpg")
ElseIf Command1.Caption = "9" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0008.jpg")
ElseIf Command1.Caption = "10" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0009.jpg")
ElseIf Command1.Caption = "11" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0010.jpg")
68

ElseIf Command1.Caption = "12" Then


Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0011.jpg")
ElseIf Command1.Caption = "13" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0012.jpg")
ElseIf Command1.Caption = "14" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0013.jpg")
ElseIf Command1.Caption = "15" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0014.jpg")
ElseIf Command1.Caption = "16" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0015.jpg")
ElseIf Command1.Caption = "17" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0016.jpg")
ElseIf Command1.Caption = "18" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0017.jpg")
ElseIf Command1.Caption = "19" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0018.jpg")
ElseIf Command1.Caption = "20" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0019.jpg")
ElseIf Command1.Caption = "21" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0020.jpg")
ElseIf Command1.Caption = "22" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0021.jpg")
ElseIf Command1.Caption = "23" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0022.jpg")
ElseIf Command1.Caption = "24" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0023.jpg")
ElseIf Command1.Caption = "25" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0024.jpg")
ElseIf Command1.Caption = "26" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0025.jpg")
ElseIf Command1.Caption = "27" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0026.jpg")
ElseIf Command1.Caption = "28" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0027.jpg")
ElseIf Command1.Caption = "29" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0028.jpg")
ElseIf Command1.Caption = "30" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0029.jpg")
ElseIf Command1.Caption = "31" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0030.jpg")
ElseIf Command1.Caption = "32" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0031.jpg")
ElseIf Command1.Caption = "33" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0032.jpg")
ElseIf Command1.Caption = "34" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0033.jpg")
Information.Caption = "Analyzing System Resources....."
ElseIf Command1.Caption = "35" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0034.jpg")
ElseIf Command1.Caption = "36" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0035.jpg")
69

ElseIf Command1.Caption = "37" Then


Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0036.jpg")
ElseIf Command1.Caption = "38" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0037.jpg")
ElseIf Command1.Caption = "39" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0038.jpg")
ElseIf Command1.Caption = "40" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0039.jpg")
ElseIf Command1.Caption = "41" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0040.jpg")
ElseIf Command1.Caption = "42" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0041.jpg")
ElseIf Command1.Caption = "43" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0042.jpg")
ElseIf Command1.Caption = "44" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0043.jpg")
ElseIf Command1.Caption = "45" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0044.jpg")
ElseIf Command1.Caption = "46" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0045.jpg")
ElseIf Command1.Caption = "47" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0046.jpg")
ElseIf Command1.Caption = "48" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0047.jpg")
ElseIf Command1.Caption = "49" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0048.jpg")
ElseIf Command1.Caption = "50" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0049.jpg")
ElseIf Command1.Caption = "51" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0050.jpg")
ElseIf Command1.Caption = "52" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0051.jpg")
ElseIf Command1.Caption = "53" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0052.jpg")
ElseIf Command1.Caption = "54" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0053.jpg")
ElseIf Command1.Caption = "55" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0054.jpg")
ElseIf Command1.Caption = "56" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0055.jpg")
ElseIf Command1.Caption = "57" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0056.jpg")
ElseIf Command1.Caption = "58" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0057.jpg")
ElseIf Command1.Caption = "59" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0058.jpg")
ElseIf Command1.Caption = "60" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0059.jpg")
ElseIf Command1.Caption = "61" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0060.jpg")
ElseIf Command1.Caption = "62" Then
70

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0061.jpg")


ElseIf Command1.Caption = "63" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0062.jpg")
ElseIf Command1.Caption = "64" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0063.jpg")
ElseIf Command1.Caption = "65" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0064.jpg")
ElseIf Command1.Caption = "66" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0065.jpg")
ElseIf Command1.Caption = "67" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0066.jpg")
ElseIf Command1.Caption = "68" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0067.jpg")
ElseIf Command1.Caption = "69" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0068.jpg")
ElseIf Command1.Caption = "70" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0069.jpg")
ElseIf Command1.Caption = "71" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0070.jpg")
ElseIf Command1.Caption = "72" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0071.jpg")
ElseIf Command1.Caption = "73" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0072.jpg")
ElseIf Command1.Caption = "74" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0073.jpg")
ElseIf Command1.Caption = "75" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0074.jpg")
ElseIf Command1.Caption = "76" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0075.jpg")
ElseIf Command1.Caption = "77" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0076.jpg")
ElseIf Command1.Caption = "78" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0077.jpg")
ElseIf Command1.Caption = "79" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0078.jpg")
ElseIf Command1.Caption = "80" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0079.jpg")
ElseIf Command1.Caption = "81" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0080.jpg")
ElseIf Command1.Caption = "82" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0081.jpg")
ElseIf Command1.Caption = "83" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0082.jpg")
Information.Caption = "Configuring Settings....."
ElseIf Command1.Caption = "84" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0083.jpg")
ElseIf Command1.Caption = "85" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0084.jpg")
ElseIf Command1.Caption = "86" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0085.jpg")
ElseIf Command1.Caption = "87" Then
71

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0086.jpg")


ElseIf Command1.Caption = "88" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0087.jpg")
ElseIf Command1.Caption = "89" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0088.jpg")
ElseIf Command1.Caption = "90" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0089.jpg")
ElseIf Command1.Caption = "91" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0090.jpg")
ElseIf Command1.Caption = "92" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0091.jpg")
ElseIf Command1.Caption = "93" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0092.jpg")
ElseIf Command1.Caption = "94" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0093.jpg")
ElseIf Command1.Caption = "95" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0094.jpg")
ElseIf Command1.Caption = "96" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0095.jpg")
ElseIf Command1.Caption = "97" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0096.jpg")
ElseIf Command1.Caption = "98" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0097.jpg")
ElseIf Command1.Caption = "99" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0098.jpg")
ElseIf Command1.Caption = "100" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0099.jpg")
ElseIf Command1.Caption = "101" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0100.jpg")
ElseIf Command1.Caption = "102" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0101.jpg")
ElseIf Command1.Caption = "103" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0102.jpg")
ElseIf Command1.Caption = "104" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0103.jpg")
ElseIf Command1.Caption = "105" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0104.jpg")
ElseIf Command1.Caption = "106" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0105.jpg")
ElseIf Command1.Caption = "107" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0106.jpg")
ElseIf Command1.Caption = "108" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0107.jpg")
ElseIf Command1.Caption = "109" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0108.jpg")
ElseIf Command1.Caption = "110" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0109.jpg")
ElseIf Command1.Caption = "111" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0110.jpg")
ElseIf Command1.Caption = "112" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0111.jpg")
72

ElseIf Command1.Caption = "113" Then


Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0112.jpg")
ElseIf Command1.Caption = "114" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0113.jpg")
ElseIf Command1.Caption = "115" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0114.jpg")
ElseIf Command1.Caption = "116" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0115.jpg")
ElseIf Command1.Caption = "117" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0116.jpg")
ElseIf Command1.Caption = "118" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0117.jpg")
ElseIf Command1.Caption = "119" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0118.jpg")
ElseIf Command1.Caption = "120" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0119.jpg")
ElseIf Command1.Caption = "121" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0120.jpg")
ElseIf Command1.Caption = "122" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0121.jpg")
ElseIf Command1.Caption = "123" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0122.jpg")
ElseIf Command1.Caption = "124" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0123.jpg")
ElseIf Command1.Caption = "125" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0124.jpg")
ElseIf Command1.Caption = "126" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0125.jpg")
ElseIf Command1.Caption = "127" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0126.jpg")
ElseIf Command1.Caption = "128" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0127.jpg")
ElseIf Command1.Caption = "129" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0128.jpg")
ElseIf Command1.Caption = "130" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0129.jpg")
ElseIf Command1.Caption = "131" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0130.jpg")
ElseIf Command1.Caption = "132" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0131.jpg")
ElseIf Command1.Caption = "133" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0132.jpg")
ElseIf Command1.Caption = "134" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0133.jpg")
ElseIf Command1.Caption = "135" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0134.jpg")
ElseIf Command1.Caption = "136" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0135.jpg")
ElseIf Command1.Caption = "137" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0136.jpg")
ElseIf Command1.Caption = "138" Then
73

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0137.jpg")


ElseIf Command1.Caption = "139" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0138.jpg")
ElseIf Command1.Caption = "140" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0139.jpg")
ElseIf Command1.Caption = "141" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0140.jpg")
ElseIf Command1.Caption = "142" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0141.jpg")
Information.Caption = "Loading Database Files....."
ElseIf Command1.Caption = "143" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0142.jpg")
ElseIf Command1.Caption = "144" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0143.jpg")
ElseIf Command1.Caption = "145" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0144.jpg")
ElseIf Command1.Caption = "146" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0145.jpg")
ElseIf Command1.Caption = "147" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0146.jpg")
ElseIf Command1.Caption = "148" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0147.jpg")
ElseIf Command1.Caption = "149" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0148.jpg")
ElseIf Command1.Caption = "150" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0149.jpg")
ElseIf Command1.Caption = "151" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0150.jpg")
ElseIf Command1.Caption = "152" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0151.jpg")
ElseIf Command1.Caption = "153" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0152.jpg")
ElseIf Command1.Caption = "154" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0153.jpg")
ElseIf Command1.Caption = "155" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0154.jpg")
ElseIf Command1.Caption = "156" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0155.jpg")
ElseIf Command1.Caption = "157" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0156.jpg")
ElseIf Command1.Caption = "158" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0157.jpg")
ElseIf Command1.Caption = "159" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0158.jpg")
ElseIf Command1.Caption = "160" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0159.jpg")
ElseIf Command1.Caption = "161" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0160.jpg")
ElseIf Command1.Caption = "162" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0161.jpg")
ElseIf Command1.Caption = "163" Then
74

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0162.jpg")


ElseIf Command1.Caption = "164" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0163.jpg")
ElseIf Command1.Caption = "165" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0164.jpg")
ElseIf Command1.Caption = "166" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0165.jpg")
ElseIf Command1.Caption = "167" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0166.jpg")
ElseIf Command1.Caption = "168" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0167.jpg")
ElseIf Command1.Caption = "169" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0168.jpg")
ElseIf Command1.Caption = "170" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0169.jpg")
ElseIf Command1.Caption = "171" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0170.jpg")
ElseIf Command1.Caption = "172" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0171.jpg")
ElseIf Command1.Caption = "173" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0172.jpg")
ElseIf Command1.Caption = "174" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0173.jpg")
ElseIf Command1.Caption = "175" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0174.jpg")
ElseIf Command1.Caption = "176" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0175.jpg")
ElseIf Command1.Caption = "176" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0176.jpg")
ElseIf Command1.Caption = "178" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0177.jpg")
ElseIf Command1.Caption = "179" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0178.jpg")
ElseIf Command1.Caption = "180" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0179.jpg")
ElseIf Command1.Caption = "181" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0180.jpg")
ElseIf Command1.Caption = "182" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0181.jpg")
ElseIf Command1.Caption = "183" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0182.jpg")
ElseIf Command1.Caption = "184" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0183.jpg")
ElseIf Command1.Caption = "185" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0184.jpg")
ElseIf Command1.Caption = "186" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0185.jpg")
ElseIf Command1.Caption = "187" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0186.jpg")
ElseIf Command1.Caption = "188" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0187.jpg")
75

ElseIf Command1.Caption = "189" Then


Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0188.jpg")
ElseIf Command1.Caption = "190" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0189.jpg")
ElseIf Command1.Caption = "191" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0190.jpg")
ElseIf Command1.Caption = "192" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0191.jpg")
ElseIf Command1.Caption = "193" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0192.jpg")
ElseIf Command1.Caption = "194" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0193.jpg")
ElseIf Command1.Caption = "195" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0194.jpg")
ElseIf Command1.Caption = "196" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0195.jpg")
ElseIf Command1.Caption = "197" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0196.jpg")
ElseIf Command1.Caption = "198" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0197.jpg")
ElseIf Command1.Caption = "199" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0198.jpg")
ElseIf Command1.Caption = "200" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0199.jpg")
ElseIf Command1.Caption = "201" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0200.jpg")
ElseIf Command1.Caption = "202" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0201.jpg")
ElseIf Command1.Caption = "203" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0202.jpg")
ElseIf Command1.Caption = "204" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0203.jpg")
ElseIf Command1.Caption = "205" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0204.jpg")
ElseIf Command1.Caption = "206" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0205.jpg")
ElseIf Command1.Caption = "207" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0206.jpg")
ElseIf Command1.Caption = "208" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0207.jpg")
ElseIf Command1.Caption = "209" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0208.jpg")
ElseIf Command1.Caption = "210" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0209.jpg")
ElseIf Command1.Caption = "211" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0210.jpg")
ElseIf Command1.Caption = "212" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0211.jpg")
ElseIf Command1.Caption = "213" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0212.jpg")
ElseIf Command1.Caption = "214" Then
76

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0213.jpg")


ElseIf Command1.Caption = "215" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0214.jpg")
ElseIf Command1.Caption = "216" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0215.jpg")
ElseIf Command1.Caption = "217" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0216.jpg")
ElseIf Command1.Caption = "218" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0217.jpg")
ElseIf Command1.Caption = "219" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0218.jpg")
ElseIf Command1.Caption = "220" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0219.jpg")
ElseIf Command1.Caption = "221" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0220.jpg")
ElseIf Command1.Caption = "222" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0221.jpg")
ElseIf Command1.Caption = "223" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0222.jpg")
ElseIf Command1.Caption = "224" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0223.jpg")
ElseIf Command1.Caption = "225" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0224.jpg")
ElseIf Command1.Caption = "226" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0225.jpg")
ElseIf Command1.Caption = "227" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0226.jpg")
ElseIf Command1.Caption = "228" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0227.jpg")
ElseIf Command1.Caption = "229" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0228.jpg")
ElseIf Command1.Caption = "230" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0229.jpg")
ElseIf Command1.Caption = "231" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0230.jpg")
ElseIf Command1.Caption = "232" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0231.jpg")
ElseIf Command1.Caption = "233" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0232.jpg")
ElseIf Command1.Caption = "234" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0233.jpg")
ElseIf Command1.Caption = "235" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0234.jpg")
ElseIf Command1.Caption = "236" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0235.jpg")
ElseIf Command1.Caption = "237" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0236.jpg")
ElseIf Command1.Caption = "238" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0237.jpg")
ElseIf Command1.Caption = "239" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0238.jpg")
77

ElseIf Command1.Caption = "240" Then


Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0239.jpg")
ElseIf Command1.Caption = "241" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0240.jpg")
ElseIf Command1.Caption = "242" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0241.jpg")
ElseIf Command1.Caption = "243" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0242.jpg")
ElseIf Command1.Caption = "244" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0243.jpg")
ElseIf Command1.Caption = "245" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0244.jpg")
ElseIf Command1.Caption = "246" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0245.jpg")
ElseIf Command1.Caption = "247" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0246.jpg")
ElseIf Command1.Caption = "248" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0247.jpg")
ElseIf Command1.Caption = "249" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0248.jpg")
ElseIf Command1.Caption = "250" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0249.jpg")
ElseIf Command1.Caption = "251" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0250.jpg")
ElseIf Command1.Caption = "252" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0251.jpg")
ElseIf Command1.Caption = "253" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0252.jpg")
ElseIf Command1.Caption = "254" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0253.jpg")
ElseIf Command1.Caption = "255" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0254.jpg")
ElseIf Command1.Caption = "256" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0255.jpg")
ElseIf Command1.Caption = "257" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0256.jpg")
ElseIf Command1.Caption = "258" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0257.jpg")
ElseIf Command1.Caption = "259" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0258.jpg")
ElseIf Command1.Caption = "260" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0259.jpg")
ElseIf Command1.Caption = "261" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0260.jpg")
ElseIf Command1.Caption = "262" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0261.jpg")
ElseIf Command1.Caption = "263" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0262.jpg")
ElseIf Command1.Caption = "264" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0263.jpg")
ElseIf Command1.Caption = "265" Then
78

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0264.jpg")


ElseIf Command1.Caption = "266" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0265.jpg")
ElseIf Command1.Caption = "267" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0266.jpg")
ElseIf Command1.Caption = "268" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0267.jpg")
ElseIf Command1.Caption = "269" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0268.jpg")
ElseIf Command1.Caption = "270" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0269.jpg")
ElseIf Command1.Caption = "271" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0270.jpg")
ElseIf Command1.Caption = "272" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0271.jpg")
Information.Caption = "Finalizing....."
ElseIf Command1.Caption = "273" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0272.jpg")
ElseIf Command1.Caption = "274" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0273.jpg")
ElseIf Command1.Caption = "275" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0274.jpg")
ElseIf Command1.Caption = "276" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0275.jpg")
ElseIf Command1.Caption = "277" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0276.jpg")
ElseIf Command1.Caption = "278" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0277.jpg")
ElseIf Command1.Caption = "279" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0278.jpg")
ElseIf Command1.Caption = "280" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0279.jpg")
ElseIf Command1.Caption = "281" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0280.jpg")
ElseIf Command1.Caption = "282" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0281.jpg")
ElseIf Command1.Caption = "283" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0282.jpg")
ElseIf Command1.Caption = "284" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0283.jpg")
ElseIf Command1.Caption = "285" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0284.jpg")
ElseIf Command1.Caption = "286" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0285.jpg")
ElseIf Command1.Caption = "287" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0286.jpg")
ElseIf Command1.Caption = "288" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0287.jpg")
ElseIf Command1.Caption = "289" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0288.jpg")
ElseIf Command1.Caption = "290" Then
79

Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0289.jpg")


ElseIf Command1.Caption = "291" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0290.jpg")
ElseIf Command1.Caption = "292" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0291.jpg")
ElseIf Command1.Caption = "293" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0292.jpg")
ElseIf Command1.Caption = "294" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0293.jpg")
ElseIf Command1.Caption = "295" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0294.jpg")
ElseIf Command1.Caption = "296" Then
Information.Caption = "Completed....."
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0295.jpg")
ElseIf Command1.Caption = "297" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0296.jpg")
ElseIf Command1.Caption = "298" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0297.jpg")
ElseIf Command1.Caption = "299" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0298.jpg")
ElseIf Command1.Caption = "300" Then
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0299.jpg")
ElseIf Command1.Caption = "301" Then
Information.Caption = ""
Splash.Picture = LoadPicture(App.Path & "/Animations/Splash0300.jpg")
Timer1.Enabled = False
Text1.Visible = True
Text2.Visible = True
loginbtn.Visible = True
End If
End Sub

Private Sub Timer2_Timer()


Command2.Caption = Val(Command2.Caption) + 1
If Command2.Caption = "1" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading00.jpg")
ElseIf Command2.Caption = "2" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading01.jpg")
ElseIf Command2.Caption = "3" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading02.jpg")
ElseIf Command2.Caption = "4" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading03.jpg")
ElseIf Command2.Caption = "5" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading04.jpg")
ElseIf Command2.Caption = "6" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading05.jpg")
ElseIf Command2.Caption = "7" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading06.jpg")
ElseIf Command2.Caption = "8" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading07.jpg")
ElseIf Command2.Caption = "9" Then
80

Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading08.jpg")


ElseIf Command2.Caption = "10" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading09.jpg")
ElseIf Command2.Caption = "11" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading10.jpg")
ElseIf Command2.Caption = "12" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading11.jpg")
ElseIf Command2.Caption = "13" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading12.jpg")
ElseIf Command2.Caption = "14" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading13.jpg")
ElseIf Command2.Caption = "15" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading14.jpg")
ElseIf Command2.Caption = "16" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading15.jpg")
ElseIf Command2.Caption = "17" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading16.jpg")
ElseIf Command2.Caption = "18" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading17.jpg")
ElseIf Command2.Caption = "19" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading18.jpg")
ElseIf Command2.Caption = "20" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading19.jpg")
ElseIf Command2.Caption = "21" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading20.jpg")
ElseIf Command2.Caption = "22" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading21.jpg")
ElseIf Command2.Caption = "23" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading22.jpg")
ElseIf Command2.Caption = "24" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading23.jpg")
ElseIf Command2.Caption = "25" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading24.jpg")
ElseIf Command2.Caption = "26" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading25.jpg")
ElseIf Command2.Caption = "27" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/Loading/Loading26.jpg")
Command2.Caption = "0"
Timer2.Enabled = False
Image1.Visible = False
loginbtn.Enabled = True
loginbtn.Caption = "LOG IN"
AWCSLogin.RecordSource = "Select * from Accounts where USERNAME='" &
Text1.Text & "' and PASSWORD ='" & Text2.Text & "'"
AWCSLogin.Refresh
If AWCSLogin.Recordset.EOF Then
MsgBox "Account not found, Please contact the Administrator.", vbCritical, "AWCS
Login"
Else
MainMenu.UsernameLabel.Caption = AWCSLogin.Recordset.Fields("USERNAME")
AccountType.Text = AWCSLogin.Recordset.Fields("ACCOUNT TYPE")
81

Timer2.Enabled = False
If AccountType.Text = "STANDARD" Then
With MainMenu
.Image4.Visible = False
.AdminFRAME.Visible = False
.Picture = LoadPicture(App.Path & "/Animations/Backgrounds/MainMenu/1u.jpg")
.DefaultBTN.Value = True
End With
If AccountType.Text = "ADMINISTRATOR" Then
With MainMenu
.Image4.Visible = True
.AdminFRAME.Visible = True
.Picture = LoadPicture(App.Path & "/Animations/Backgrounds/MainMenu/1.jpg")
.MBTN4.Visible = True
.DefaultBTN.Value = True
End With
End If
End If
MainMenu.Show
NotificationForm.Show
Me.Hide
Text1.Text = ""
Text2.Text = ""
End If
End If
End Sub
Option Explicit

Private Sub AboutBTN_Click()


AboutAWCS.Show
End Sub

Private Sub chameleonButton1_Click()


NotificationForm.Hide
chameleonButton1.Visible = False
chameleonButton2.Visible = True
End Sub

Private Sub chameleonButton2_Click()


NotificationForm.Show
chameleonButton2.Visible = False
chameleonButton1.Visible = True
End Sub

Private Sub chameleonButton4_Click()


Me.Hide
SwitchScheduling3F.Show
End Sub

Private Sub DataBTN_Click()


Me.Hide
82

FactoryData.Show
End Sub

Private Sub DateFilter_Change()


If DateFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "" & "%" &
"'")
ElseIf DateFilter.Text = "JANUARY (1)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "1" & "%" &
"'")
ElseIf DateFilter.Text = "FEBRUARY (2)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "2" & "%" &
"'")
ElseIf DateFilter.Text = "MARCH (3)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "3" & "%" &
"'")
ElseIf DateFilter.Text = "ARPIL (4)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "4" & "%" &
"'")
ElseIf DateFilter.Text = "MAY (5)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "5" & "%" &
"'")
ElseIf DateFilter.Text = "JUNE (6)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "6" & "%" &
"'")
ElseIf DateFilter.Text = "JULY (7)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "7" & "%" &
"'")
ElseIf DateFilter.Text = "AUGUST (8)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "8" & "%" &
"'")
ElseIf DateFilter.Text = "SEPTEMBER (9)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "9" & "%" &
"'")
ElseIf DateFilter.Text = "OCTOBER (10)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "10" & "%"
& "'")
ElseIf DateFilter.Text = "NOVEMBER (11)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "11" & "%"
& "'")
ElseIf DateFilter.Text = "DECEMBER (12)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "12" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" &
Me.DateFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
83

.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub DateFilter_Click()


If DateFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "" & "%" &
"'")
ElseIf DateFilter.Text = "JANUARY (1)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "1" & "%" &
"'")
ElseIf DateFilter.Text = "FEBRUARY (2)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "2" & "%" &
"'")
ElseIf DateFilter.Text = "MARCH (3)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "3" & "%" &
"'")
ElseIf DateFilter.Text = "ARPIL (4)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "4" & "%" &
"'")
ElseIf DateFilter.Text = "MAY (5)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "5" & "%" &
"'")
ElseIf DateFilter.Text = "JUNE (6)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "6" & "%" &
"'")
ElseIf DateFilter.Text = "JULY (7)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "7" & "%" &
"'")
ElseIf DateFilter.Text = "AUGUST (8)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "8" & "%" &
"'")
ElseIf DateFilter.Text = "SEPTEMBER (9)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "9" & "%" &
"'")
ElseIf DateFilter.Text = "OCTOBER (10)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "10" & "%"
& "'")
ElseIf DateFilter.Text = "NOVEMBER (11)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "11" & "%"
& "'")
ElseIf DateFilter.Text = "DECEMBER (12)" Then
84

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "12" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" &
Me.DateFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With

End Sub

Private Sub DateFilter_KeyDown(KeyCode As Integer, Shift As Integer)


If DateFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "" & "%" &
"'")
ElseIf DateFilter.Text = "JANUARY (1)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "1" & "%" &
"'")
ElseIf DateFilter.Text = "FEBRUARY (2)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "2" & "%" &
"'")
ElseIf DateFilter.Text = "MARCH (3)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "3" & "%" &
"'")
ElseIf DateFilter.Text = "ARPIL (4)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "4" & "%" &
"'")
ElseIf DateFilter.Text = "MAY (5)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "5" & "%" &
"'")
ElseIf DateFilter.Text = "JUNE (6)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "6" & "%" &
"'")
ElseIf DateFilter.Text = "JULY (7)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "7" & "%" &
"'")
ElseIf DateFilter.Text = "AUGUST (8)" Then
85

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "8" & "%" &
"'")
ElseIf DateFilter.Text = "SEPTEMBER (9)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "9" & "%" &
"'")
ElseIf DateFilter.Text = "OCTOBER (10)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "10" & "%"
& "'")
ElseIf DateFilter.Text = "NOVEMBER (11)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "11" & "%"
& "'")
ElseIf DateFilter.Text = "DECEMBER (12)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "12" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" &
Me.DateFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With

End Sub

Private Sub DateFilter_KeyUp(KeyCode As Integer, Shift As Integer)


If DateFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "" & "%" &
"'")
ElseIf DateFilter.Text = "JANUARY (1)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "1" & "%" &
"'")
ElseIf DateFilter.Text = "FEBRUARY (2)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "2" & "%" &
"'")
ElseIf DateFilter.Text = "MARCH (3)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "3" & "%" &
"'")
ElseIf DateFilter.Text = "ARPIL (4)" Then
86

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "4" & "%" &
"'")
ElseIf DateFilter.Text = "MAY (5)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "5" & "%" &
"'")
ElseIf DateFilter.Text = "JUNE (6)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "6" & "%" &
"'")
ElseIf DateFilter.Text = "JULY (7)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "7" & "%" &
"'")
ElseIf DateFilter.Text = "AUGUST (8)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "8" & "%" &
"'")
ElseIf DateFilter.Text = "SEPTEMBER (9)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "9" & "%" &
"'")
ElseIf DateFilter.Text = "OCTOBER (10)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "10" & "%"
& "'")
ElseIf DateFilter.Text = "NOVEMBER (11)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "11" & "%"
& "'")
ElseIf DateFilter.Text = "DECEMBER (12)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" & "12" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where DATE like'" &
Me.DateFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With

End Sub

Private Sub DefaultBTN_Click()


If Splash.AccountType.Text = "STANDARD" Then
87

MainMenu.Picture = LoadPicture(App.Path &


"/Animations/Backgrounds/MainMenu/1u.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = True
End If
End Sub

Private Sub DLBTN_Click()


Dim deleteall As Integer
deleteall = MsgBox("Do you want to delete all ON/OFF LOGS? You cannot undo this
process.", vbQuestion + vbYesNo, "APPLIANCE WIRING CONTROL SYSTEM")
If deleteall = vbYes Then
With DelLOGS
Do Until .Recordset.EOF
.Recordset.Delete
.Recordset.Update
.Recordset.MoveNext
Loop
End With
DataGrid2.Refresh
DelLOGS.Refresh
With DelLOGS
Do Until .Recordset.EOF
.Recordset.Delete
.Recordset.Update
.Recordset.MoveNext
Loop
End With
DataGrid2.Refresh
DelLOGS.Refresh
MsgBox "ON/OFF Logs Deleted!", vbInformation, "APPLIANCE WIRING CONTROL
SYSTEM"
RefreshLOGS.Value = True
RefreshLOGS_Click
End If
End Sub

Private Sub Form_Activate()


RoomFilter.Text = "(ALL)"
88

DateFilter.Text = "(ALL)"
SwitchFilter.Text = "(ALL)"
MenuFrame.Visible = False
MainMenu.WindowState = vbNormal
SchedulingCommands.SchedTimer.Value = True
If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1u.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = True
End If
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
If Splash.AccountType.Text = "ADMINISTRATOR" Then
End If
ActiveSchedule.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
ActiveSchedule.RecordSource = "Select * from ActiveSchedule"
ActiveSchedule.Refresh
Set DataGrid2.DataSource = ActiveSchedule
AddLOGS.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
AddLOGS.RecordSource = "Select * from SwitchLOGS"
AddLOGS.Refresh
DelLOGS.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DelLOGS.RecordSource = "Select * from SwitchLOGS"
DelLOGS.Refresh
DBLogs.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DBLogs.RecordSource = "Select * from SwitchLOGS order by DATE"
DBLogs.Refresh
Set DataGrid1.DataSource = DBLogs
With DataGrid1
.Columns(0).Width = "170"
.Columns(1).Width = "170"
.Columns(2).Width = "60"
89

.Columns(3).Width = "80"
.Columns(4).Width = "60"
.Columns(5).Width = "100"
.Font = "Arial Rounded MT Bold"
.Font.Size = "8"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
Call setrecord(Me.ActiveSchedule, "select * from ActiveSchedule where Status like'" &
"ACTIVATED" & "%" & "'")
With DataGrid2
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub Image1_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1u.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = True
End If
End Sub

Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer1.Enabled = True
End Sub
90

Private Sub Image2_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/2u.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = True
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/2.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = True
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = True
End If
End Sub

Private Sub Image2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer2.Enabled = True
End Sub

Private Sub Image3_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/3U.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = True
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/3.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = True
AdminFRAME.Visible = False
Image4.Visible = False
End If
End Sub

Private Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer3.Enabled = True
91

End Sub

Private Sub Image4_Click()


MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/4.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = True
Image4.Visible = True
End Sub

Private Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer4.Enabled = True
End Sub

Private Sub LogoutBTN_Click()


Dim out As Integer
out = MsgBox("Do you want to logout?", vbQuestion + vbYesNo, "Appliance Wiring
Control System")
If out = vbYes Then
SchedulingROOM101.DayTimer.Value = True
SchedulingROOM102.DayTimer.Value = True
SchedulingROOM103.DayTimer.Value = True
SchedulingROOM104.DayTimer.Value = True
SchedulingROOM105.DayTimer.Value = True
Scheduling1FCR.DayTimer.Value = True
Scheduling1FHW.DayTimer.Value = True
SchedulingCLINIC.DayTimer.Value = True
SchedulingROOM301.DayTimer.Value = True
SchedulingROOM302.DayTimer.Value = True
SchedulingROOM303.DayTimer.Value = True
SchedulingROOM304.DayTimer.Value = True
SchedulingROOM305.DayTimer.Value = True
Scheduling3FCR.DayTimer.Value = True
Scheduling3FHW.DayTimer.Value = True
SchedulingRESEARCH.DayTimer.Value = True
With Splash
.Picture = LoadPicture(App.Path & "/Animations/Splash0300.jpg")
.Timer1.Enabled = False
.Text1.Visible = True
.Text2.Visible = True
.Text1 = ""
.Text2 = ""
.loginbtn.Visible = True
.Show
End With
MenuFrame.Visible = False
Me.Hide
92

End If
End Sub

Private Sub MBTN1_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1u.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = False
End If
If Splash.AccountType.Text = "ADMINISTRATOR" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/1.jpg")
SwitchFRAME.Visible = True
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = False
Image4.Visible = True
End If
End Sub

Private Sub MBTN1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer1.Enabled = True
End Sub

Private Sub MBTN2_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/2u.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = True
LogFRAME.Visible = False
AdminFRAME.Visible = False
Else
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/2.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = True
LogFRAME.Visible = False
AdminFRAME.Visible = False
End If
End Sub

Private Sub MBTN2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer2.Enabled = True
End Sub
93

Private Sub MBTN3_Click()


If Splash.AccountType.Text = "STANDARD" Then
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/3U.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = True
AdminFRAME.Visible = False
Else
MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/3.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = True
AdminFRAME.Visible = False
End If
End Sub

Private Sub MBTN3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer3.Enabled = True
End Sub

Private Sub MBTN4_Click()


MainMenu.Picture = LoadPicture(App.Path &
"/Animations/Backgrounds/MainMenu/4.jpg")
SwitchFRAME.Visible = False
SchedulingFRAME.Visible = False
LogFRAME.Visible = False
AdminFRAME.Visible = True
End Sub

Private Sub MBTN4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer4.Enabled = True
End Sub

Private Sub MenuBTNN_Click()


If MenuFrame.Visible = True Then
MenuFrame.Visible = False
ElseIf MenuFrame.Visible = False Then
MenuFrame.Visible = True
End If
End Sub

Private Sub ODBTN_Click()


Me.Hide
SetupOutputsDelay.Show
End Sub
94

Private Sub RefreshLOGS_Click()


DBLogs.Refresh
DataGrid1.Refresh
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Bold = True
.HeadFont.Size = "11"
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub RoomFilter_Change()


If RoomFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" &
Me.RoomFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub RoomFilter_Click()


If RoomFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" & "" & "%"
& "'")
Else
95

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" &


Me.RoomFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub RoomFilter_KeyDown(KeyCode As Integer, Shift As Integer)


If RoomFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" &
Me.RoomFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub RoomFilter_KeyUp(KeyCode As Integer, Shift As Integer)


If RoomFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" & "" & "%"
& "'")
Else
96

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where ROOMS like'" &


Me.RoomFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub SDBTN_Click()


Me.Hide
SetupDevice.Show
End Sub

Private Sub SSBTN1F_Click()


Me.Hide
SwitchScheduling1F.Show
End Sub

Private Sub Switch1F_Click()


Me.Hide
S1Floor.Show
End Sub

Private Sub Switch2F_Click()


Me.Hide
S2Floor.Show
End Sub

Private Sub Switch3F_Click()


Me.Hide
S3Floor.Show
End Sub

Private Sub Switch4F_Click()


Me.Hide
S4Floor.Show
End Sub

Private Sub SwitchFilter_Change()


97

If SwitchFilter.Text = "(ALL)" Then


Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" &
Me.SwitchFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub SwitchFilter_Click()


If SwitchFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" &
Me.SwitchFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub SwitchFilter_KeyDown(KeyCode As Integer, Shift As Integer)


If SwitchFilter.Text = "(ALL)" Then
98

Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" &
Me.SwitchFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub SwitchFilter_KeyUp(KeyCode As Integer, Shift As Integer)


If SwitchFilter.Text = "(ALL)" Then
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" & "" & "%"
& "'")
Else
Call setrecord(Me.DBLogs, "select * from SwitchLOGS where STATUS like'" &
Me.SwitchFilter.Text & "%" & "'")
End If
With DataGrid1
.Columns(0).Width = "200"
.Columns(1).Width = "200"
.Columns(2).Width = "60"
.Columns(3).Width = "100"
.Columns(4).Width = "100"
.Columns(5).Width = "170"
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Bold = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub Timer1_Timer()


99

buff1.Caption = Val(buff1.Caption) + 1
If buff1.Caption = "1" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch00.jpg")
ElseIf buff1.Caption = "2" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch01.jpg")
ElseIf buff1.Caption = "3" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch02.jpg")
ElseIf buff1.Caption = "4" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch03.jpg")
ElseIf buff1.Caption = "5" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch04.jpg")
ElseIf buff1.Caption = "6" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch05.jpg")
ElseIf buff1.Caption = "7" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch06.jpg")
ElseIf buff1.Caption = "8" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch07.jpg")
ElseIf buff1.Caption = "9" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch08.jpg")
ElseIf buff1.Caption = "10" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch09.jpg")
ElseIf buff1.Caption = "11" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch10.jpg")
ElseIf buff1.Caption = "12" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch11.jpg")
ElseIf buff1.Caption = "13" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch12.jpg")
ElseIf buff1.Caption = "14" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch13.jpg")
ElseIf buff1.Caption = "15" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch14.jpg")
ElseIf buff1.Caption = "16" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch15.jpg")
ElseIf buff1.Caption = "17" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch16.jpg")
ElseIf buff1.Caption = "18" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch17.jpg")
ElseIf buff1.Caption = "19" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch18.jpg")
ElseIf buff1.Caption = "20" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch19.jpg")
ElseIf buff1.Caption = "21" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch20.jpg")
ElseIf buff1.Caption = "22" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch21.jpg")
ElseIf buff1.Caption = "23" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch22.jpg")
ElseIf buff1.Caption = "24" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch23.jpg")
ElseIf buff1.Caption = "25" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch24.jpg")
100

ElseIf buff1.Caption = "26" Then


Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch25.jpg")
ElseIf buff1.Caption = "27" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch26.jpg")
ElseIf buff1.Caption = "28" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch27.jpg")
ElseIf buff1.Caption = "29" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch28.jpg")
ElseIf buff1.Caption = "30" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch29.jpg")
ElseIf buff1.Caption = "31" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch30.jpg")
ElseIf buff1.Caption = "32" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch31.jpg")
ElseIf buff1.Caption = "33" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch32.jpg")
ElseIf buff1.Caption = "34" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch33.jpg")
ElseIf buff1.Caption = "35" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch34.jpg")
ElseIf buff1.Caption = "36" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch35.jpg")
ElseIf buff1.Caption = "37" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch36.jpg")
ElseIf buff1.Caption = "38" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch37.jpg")
ElseIf buff1.Caption = "39" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch38.jpg")
ElseIf buff1.Caption = "40" Then
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch00.jpg")
ElseIf buff1.Caption = "80" Then
buff1.Caption = "0"
End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Timer1.Enabled = False
Image1.Picture = LoadPicture(App.Path & "/Animations/ICONS/OnOff/Switch00.jpg")
Timer2.Enabled = False
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling00.jpg")
Timer3.Enabled = False
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged00.jpg")
Timer4.Enabled = False
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin00.jpg")
End Sub

Private Sub Timer2_Timer()


101

buff2.Caption = Val(buff2.Caption) + 1
If buff2.Caption = "1" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling00.jpg")
ElseIf buff2.Caption = "2" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling01.jpg")
ElseIf buff2.Caption = "3" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling02.jpg")
ElseIf buff2.Caption = "4" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling03.jpg")
ElseIf buff2.Caption = "5" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling04.jpg")
ElseIf buff2.Caption = "6" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling05.jpg")
ElseIf buff2.Caption = "7" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling06.jpg")
ElseIf buff2.Caption = "8" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling07.jpg")
ElseIf buff2.Caption = "9" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling08.jpg")
ElseIf buff2.Caption = "10" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling09.jpg")
ElseIf buff2.Caption = "11" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling10.jpg")
ElseIf buff2.Caption = "12" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling11.jpg")
ElseIf buff2.Caption = "13" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling12.jpg")
ElseIf buff2.Caption = "14" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling13.jpg")
ElseIf buff2.Caption = "15" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling14.jpg")
ElseIf buff2.Caption = "16" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling15.jpg")
ElseIf buff2.Caption = "17" Then
102

Image2.Picture = LoadPicture(App.Path &


"/Animations/ICONS/Sched/Scheduling16.jpg")
ElseIf buff2.Caption = "18" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling17.jpg")
ElseIf buff2.Caption = "19" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling18.jpg")
ElseIf buff2.Caption = "20" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling19.jpg")
ElseIf buff2.Caption = "21" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling20.jpg")
ElseIf buff2.Caption = "22" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling21.jpg")
ElseIf buff2.Caption = "23" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling22.jpg")
ElseIf buff2.Caption = "24" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling23.jpg")
ElseIf buff2.Caption = "25" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling24.jpg")
ElseIf buff2.Caption = "26" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling25.jpg")
ElseIf buff2.Caption = "27" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling26.jpg")
ElseIf buff2.Caption = "28" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling27.jpg")
ElseIf buff2.Caption = "29" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling28.jpg")
ElseIf buff2.Caption = "30" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling29.jpg")
ElseIf buff2.Caption = "31" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling30.jpg")
ElseIf buff2.Caption = "32" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling31.jpg")
ElseIf buff2.Caption = "33" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling32.jpg")
ElseIf buff2.Caption = "34" Then
103

Image2.Picture = LoadPicture(App.Path &


"/Animations/ICONS/Sched/Scheduling33.jpg")
ElseIf buff2.Caption = "35" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling34.jpg")
ElseIf buff2.Caption = "36" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling35.jpg")
ElseIf buff2.Caption = "37" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling36.jpg")
ElseIf buff2.Caption = "38" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling37.jpg")
ElseIf buff2.Caption = "39" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling38.jpg")
ElseIf buff2.Caption = "40" Then
Image2.Picture = LoadPicture(App.Path &
"/Animations/ICONS/Sched/Scheduling00.jpg")
ElseIf buff2.Caption = "80" Then
buff2.Caption = "0"
End If
End Sub

Private Sub Timer3_Timer()


buff3.Caption = Val(buff3.Caption) + 1
If buff3.Caption = "1" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged00.jpg")
ElseIf buff3.Caption = "2" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged01.jpg")
ElseIf buff3.Caption = "3" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged02.jpg")
ElseIf buff3.Caption = "4" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged03.jpg")
ElseIf buff3.Caption = "5" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged04.jpg")
ElseIf buff3.Caption = "6" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged05.jpg")
ElseIf buff3.Caption = "7" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged06.jpg")
ElseIf buff3.Caption = "8" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged07.jpg")
104

ElseIf buff3.Caption = "9" Then


Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged08.jpg")
ElseIf buff3.Caption = "10" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged09.jpg")
ElseIf buff3.Caption = "11" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged10.jpg")
ElseIf buff3.Caption = "12" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged11.jpg")
ElseIf buff3.Caption = "13" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged12.jpg")
ElseIf buff3.Caption = "14" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged13.jpg")
ElseIf buff3.Caption = "15" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged14.jpg")
ElseIf buff3.Caption = "16" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged15.jpg")
ElseIf buff3.Caption = "17" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged16.jpg")
ElseIf buff3.Caption = "18" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged17.jpg")
ElseIf buff3.Caption = "19" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged18.jpg")
ElseIf buff3.Caption = "20" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged19.jpg")
ElseIf buff3.Caption = "21" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged20.jpg")
ElseIf buff3.Caption = "22" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged21.jpg")
ElseIf buff3.Caption = "23" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged22.jpg")
ElseIf buff3.Caption = "24" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged23.jpg")
ElseIf buff3.Caption = "25" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged24.jpg")
105

ElseIf buff3.Caption = "26" Then


Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged25.jpg")
ElseIf buff3.Caption = "27" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged26.jpg")
ElseIf buff3.Caption = "28" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged27.jpg")
ElseIf buff3.Caption = "29" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged28.jpg")
ElseIf buff3.Caption = "30" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged29.jpg")
ElseIf buff3.Caption = "31" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged30.jpg")
ElseIf buff3.Caption = "32" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged31.jpg")
ElseIf buff3.Caption = "33" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged32.jpg")
ElseIf buff3.Caption = "34" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged33.jpg")
ElseIf buff3.Caption = "35" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged34.jpg")
ElseIf buff3.Caption = "36" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged35.jpg")
ElseIf buff3.Caption = "37" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged36.jpg")
ElseIf buff3.Caption = "38" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged37.jpg")
ElseIf buff3.Caption = "39" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged38.jpg")
ElseIf buff3.Caption = "40" Then
Image3.Picture = LoadPicture(App.Path &
"/Animations/ICONS/OLogged/Logged00.jpg")
ElseIf buff3.Caption = "80" Then
buff3.Caption = "0"
End If
End Sub

Private Sub Timer4_Timer()


106

buff4.Caption = Val(buff4.Caption) + 1
If buff4.Caption = "1" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin00.jpg")
ElseIf buff4.Caption = "2" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin01.jpg")
ElseIf buff4.Caption = "3" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin02.jpg")
ElseIf buff4.Caption = "4" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin03.jpg")
ElseIf buff4.Caption = "5" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin04.jpg")
ElseIf buff4.Caption = "6" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin05.jpg")
ElseIf buff4.Caption = "7" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin06.jpg")
ElseIf buff4.Caption = "8" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin07.jpg")
ElseIf buff4.Caption = "9" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin08.jpg")
ElseIf buff4.Caption = "10" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin09.jpg")
ElseIf buff4.Caption = "11" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin10.jpg")
ElseIf buff4.Caption = "12" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin11.jpg")
ElseIf buff4.Caption = "13" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin12.jpg")
ElseIf buff4.Caption = "14" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin13.jpg")
ElseIf buff4.Caption = "15" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin14.jpg")
ElseIf buff4.Caption = "16" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin15.jpg")
ElseIf buff4.Caption = "17" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin16.jpg")
ElseIf buff4.Caption = "18" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin17.jpg")
ElseIf buff4.Caption = "19" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin18.jpg")
ElseIf buff4.Caption = "20" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin19.jpg")
ElseIf buff4.Caption = "21" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin20.jpg")
ElseIf buff4.Caption = "22" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin21.jpg")
ElseIf buff4.Caption = "23" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin22.jpg")
ElseIf buff4.Caption = "24" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin23.jpg")
ElseIf buff4.Caption = "25" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin24.jpg")
107

ElseIf buff4.Caption = "26" Then


Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin25.jpg")
ElseIf buff4.Caption = "27" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin26.jpg")
ElseIf buff4.Caption = "28" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin27.jpg")
ElseIf buff4.Caption = "29" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin28.jpg")
ElseIf buff4.Caption = "30" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin29.jpg")
ElseIf buff4.Caption = "31" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin30.jpg")
ElseIf buff4.Caption = "32" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin31.jpg")
ElseIf buff4.Caption = "33" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin32.jpg")
ElseIf buff4.Caption = "34" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin33.jpg")
ElseIf buff4.Caption = "35" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin34.jpg")
ElseIf buff4.Caption = "36" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin35.jpg")
ElseIf buff4.Caption = "37" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin36.jpg")
ElseIf buff4.Caption = "38" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin37.jpg")
ElseIf buff4.Caption = "39" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin38.jpg")
ElseIf buff4.Caption = "40" Then
Image4.Picture = LoadPicture(App.Path & "/Animations/ICONS/Admin/Admin00.jpg")
ElseIf buff4.Caption = "80" Then
buff4.Caption = "0"
End If
End Sub

Private Sub Timer5_Timer()


Dim today As Variant
today = Now
LblTime.Caption = Time
LblDate.Caption = Format(today, "m") & "/" & Format(today, "d") & "/" & Format(today,
"yy")
LblDay.Caption = Format(today, "DDDD")
End Sub

Private Sub UABTN_Click()


Me.Hide
UserAccounts.Show
End Sub
Private Sub BTN101_Click()
Server1F.DB101.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
Server1F.DB101.Refresh
108

Server1F.L101O1.Text = Server1F.DB101.Recordset.Fields("O1LABEL")
Server1F.L101O2.Text = Server1F.DB101.Recordset.Fields("O2LABEL")
Server1F.L101O3.Text = Server1F.DB101.Recordset.Fields("O3LABEL")
Server1F.L101O4.Text = Server1F.DB101.Recordset.Fields("O4LABEL")
Server1F.S101.Text = Server1F.DB101.Recordset.Fields("STATUS")
Server1F.C101.Text = Server1F.DB101.Recordset.Fields("COMPORT")
Server1F.O1S101.Text = Server1F.DB101.Recordset.Fields("O1STATUS")
Server1F.O2S101.Text = Server1F.DB101.Recordset.Fields("O2STATUS")
Server1F.O3S101.Text = Server1F.DB101.Recordset.Fields("O3STATUS")
Server1F.O4S101.Text = Server1F.DB101.Recordset.Fields("O4STATUS")
Server1F.OD101O1.Text = Server1F.DB101.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD101O2.Text = Server1F.DB101.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD101O3.Text = Server1F.DB101.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD101O4.Text = Server1F.DB101.Recordset.Fields("O4OUTPUTDELAY")
ROOM101.ROOMLABEL.Caption = BTN101.Caption
ROOM101.O1BTN.Caption = Server1F.L101O1.Text
ROOM101.O2BTN.Caption = Server1F.L101O2.Text
ROOM101.O3BTN.Caption = Server1F.L101O3.Text
ROOM101.O4BTN.Caption = Server1F.L101O4.Text
ROOM101.O1BTNOFF.Caption = Server1F.L101O1.Text
ROOM101.O2BTNOFF.Caption = Server1F.L101O2.Text
ROOM101.O3BTNOFF.Caption = Server1F.L101O3.Text
ROOM101.O4BTNOFF.Caption = Server1F.L101O4.Text
ROOM101.S1.Caption = Server1F.L101O1.Text
ROOM101.S2.Caption = Server1F.L101O2.Text
ROOM101.S3.Caption = Server1F.L101O3.Text
ROOM101.S4.Caption = Server1F.L101O4.Text
ROOM101.O1ELabel.Text = Server1F.L101O1.Text
ROOM101.O2ELabel.Text = Server1F.L101O2.Text
ROOM101.O3ELabel.Text = Server1F.L101O3.Text
ROOM101.O4ELabel.Text = Server1F.L101O4.Text
ROOM101.O1Delay.Caption = Server1F.OD101O1.Text & " Minute/s"
ROOM101.O2Delay.Caption = Server1F.OD101O2.Text & " Minute/s"
ROOM101.O3Delay.Caption = Server1F.OD101O3.Text & " Minute/s"
ROOM101.O4Delay.Caption = Server1F.OD101O4.Text & " Minute/s"
If ROOM101.Arduino.PortOpen = True Then
ROOM101.Arduino.PortOpen = False
Else
ROOM101.Arduino.RThreshold = 3
ROOM101.Arduino.Settings = "9600,n,8,1"
ROOM101.Arduino.CommPort = Server1F.C101.Text
ROOM101.Arduino.PortOpen = True
ROOM101.Arduino.DTREnable = False
ROOM101.Show 1, S1Floor
End If
End Sub

Private Sub BTN102_Click()


Server1F.DB102.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
Server1F.DB102.Refresh
Server1F.L102O1.Text = Server1F.DB102.Recordset.Fields("O1LABEL")
109

Server1F.L102O2.Text = Server1F.DB102.Recordset.Fields("O2LABEL")
Server1F.L102O3.Text = Server1F.DB102.Recordset.Fields("O3LABEL")
Server1F.L102O4.Text = Server1F.DB102.Recordset.Fields("O4LABEL")
Server1F.S102.Text = Server1F.DB102.Recordset.Fields("STATUS")
Server1F.C102.Text = Server1F.DB102.Recordset.Fields("COMPORT")
Server1F.O1S102.Text = Server1F.DB102.Recordset.Fields("O1STATUS")
Server1F.O2S102.Text = Server1F.DB102.Recordset.Fields("O2STATUS")
Server1F.O3S102.Text = Server1F.DB102.Recordset.Fields("O3STATUS")
Server1F.O4S102.Text = Server1F.DB102.Recordset.Fields("O4STATUS")
Server1F.OD102O1.Text = Server1F.DB102.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD102O2.Text = Server1F.DB102.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD102O3.Text = Server1F.DB102.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD102O4.Text = Server1F.DB102.Recordset.Fields("O4OUTPUTDELAY")
ROOM102.ROOMLABEL.Caption = BTN102.Caption
ROOM102.O1BTN.Caption = Server1F.L102O1.Text
ROOM102.O2BTN.Caption = Server1F.L102O2.Text
ROOM102.O3BTN.Caption = Server1F.L102O3.Text
ROOM102.O4BTN.Caption = Server1F.L102O4.Text
ROOM102.O1BTNOFF.Caption = Server1F.L102O1.Text
ROOM102.O2BTNOFF.Caption = Server1F.L102O2.Text
ROOM102.O3BTNOFF.Caption = Server1F.L102O3.Text
ROOM102.O4BTNOFF.Caption = Server1F.L102O4.Text
ROOM102.S1.Caption = Server1F.L102O1.Text
ROOM102.S2.Caption = Server1F.L102O2.Text
ROOM102.S3.Caption = Server1F.L102O3.Text
ROOM102.S4.Caption = Server1F.L102O4.Text
ROOM102.O1ELabel.Text = Server1F.L102O1.Text
ROOM102.O2ELabel.Text = Server1F.L102O2.Text
ROOM102.O3ELabel.Text = Server1F.L102O3.Text
ROOM102.O4ELabel.Text = Server1F.L102O4.Text
ROOM102.O1Delay.Caption = Server1F.OD102O1.Text & " Minute/s"
ROOM102.O2Delay.Caption = Server1F.OD102O2.Text & " Minute/s"
ROOM102.O3Delay.Caption = Server1F.OD102O3.Text & " Minute/s"
ROOM102.O4Delay.Caption = Server1F.OD102O4.Text & " Minute/s"
If ROOM102.Arduino.PortOpen = True Then
ROOM102.Arduino.PortOpen = False
Else
ROOM102.Arduino.RThreshold = 3
ROOM102.Arduino.Settings = "9600,n,8,1"
ROOM102.Arduino.CommPort = Server1F.C102.Text
ROOM102.Arduino.PortOpen = True
ROOM102.Arduino.DTREnable = False
ROOM102.Show 1, S1Floor
End If
End Sub

Private Sub BTN103_Click()


Server1F.DB103.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
Server1F.DB103.Refresh
Server1F.L103O1.Text = Server1F.DB103.Recordset.Fields("O1LABEL")
Server1F.L103O2.Text = Server1F.DB103.Recordset.Fields("O2LABEL")
110

Server1F.L103O3.Text = Server1F.DB103.Recordset.Fields("O3LABEL")
Server1F.L103O4.Text = Server1F.DB103.Recordset.Fields("O4LABEL")
Server1F.S103.Text = Server1F.DB103.Recordset.Fields("STATUS")
Server1F.C103.Text = Server1F.DB103.Recordset.Fields("COMPORT")
Server1F.O1S103.Text = Server1F.DB103.Recordset.Fields("O1STATUS")
Server1F.O2S103.Text = Server1F.DB103.Recordset.Fields("O2STATUS")
Server1F.O3S103.Text = Server1F.DB103.Recordset.Fields("O3STATUS")
Server1F.O4S103.Text = Server1F.DB103.Recordset.Fields("O4STATUS")
Server1F.OD103O1.Text = Server1F.DB103.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD103O2.Text = Server1F.DB103.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD103O3.Text = Server1F.DB103.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD103O4.Text = Server1F.DB103.Recordset.Fields("O4OUTPUTDELAY")
ROOM103.ROOMLABEL.Caption = BTN103.Caption
ROOM103.O1BTN.Caption = Server1F.L103O1.Text
ROOM103.O2BTN.Caption = Server1F.L103O2.Text
ROOM103.O3BTN.Caption = Server1F.L103O3.Text
ROOM103.O4BTN.Caption = Server1F.L103O4.Text
ROOM103.O1BTNOFF.Caption = Server1F.L103O1.Text
ROOM103.O2BTNOFF.Caption = Server1F.L103O2.Text
ROOM103.O3BTNOFF.Caption = Server1F.L103O3.Text
ROOM103.O4BTNOFF.Caption = Server1F.L103O4.Text
ROOM103.S1.Caption = Server1F.L103O1.Text
ROOM103.S2.Caption = Server1F.L103O2.Text
ROOM103.S3.Caption = Server1F.L103O3.Text
ROOM103.S4.Caption = Server1F.L103O4.Text
ROOM103.O1ELabel.Text = Server1F.L103O1.Text
ROOM103.O2ELabel.Text = Server1F.L103O2.Text
ROOM103.O3ELabel.Text = Server1F.L103O3.Text
ROOM103.O4ELabel.Text = Server1F.L103O4.Text
ROOM103.O1Delay.Caption = Server1F.OD103O1.Text & " Minute/s"
ROOM103.O2Delay.Caption = Server1F.OD103O2.Text & " Minute/s"
ROOM103.O3Delay.Caption = Server1F.OD103O3.Text & " Minute/s"
ROOM103.O4Delay.Caption = Server1F.OD103O4.Text & " Minute/s"
If ROOM103.Arduino.PortOpen = True Then
ROOM103.Arduino.PortOpen = False
Else
ROOM103.Arduino.RThreshold = 3
ROOM103.Arduino.Settings = "9600,n,8,1"
ROOM103.Arduino.CommPort = Server1F.C103.Text
ROOM103.Arduino.PortOpen = True
ROOM103.Arduino.DTREnable = False
ROOM103.Show 1, S1Floor
End If

End Sub

Private Sub BTN104_Click()


Server1F.DB104.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
Server1F.DB104.Refresh
Server1F.L104O1.Text = Server1F.DB104.Recordset.Fields("O1LABEL")
Server1F.L104O2.Text = Server1F.DB104.Recordset.Fields("O2LABEL")
111

Server1F.L104O3.Text = Server1F.DB104.Recordset.Fields("O3LABEL")
Server1F.L104O4.Text = Server1F.DB104.Recordset.Fields("O4LABEL")
Server1F.S104.Text = Server1F.DB104.Recordset.Fields("STATUS")
Server1F.C104.Text = Server1F.DB104.Recordset.Fields("COMPORT")
Server1F.O1S104.Text = Server1F.DB104.Recordset.Fields("O1STATUS")
Server1F.O2S104.Text = Server1F.DB104.Recordset.Fields("O2STATUS")
Server1F.O3S104.Text = Server1F.DB104.Recordset.Fields("O3STATUS")
Server1F.O4S104.Text = Server1F.DB104.Recordset.Fields("O4STATUS")
Server1F.OD104O1.Text = Server1F.DB104.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD104O2.Text = Server1F.DB104.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD104O3.Text = Server1F.DB104.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD104O4.Text = Server1F.DB104.Recordset.Fields("O4OUTPUTDELAY")
ROOM104.ROOMLABEL.Caption = BTN104.Caption
ROOM104.O1BTN.Caption = Server1F.L104O1.Text
ROOM104.O2BTN.Caption = Server1F.L104O2.Text
ROOM104.O3BTN.Caption = Server1F.L104O3.Text
ROOM104.O4BTN.Caption = Server1F.L104O4.Text
ROOM104.O1BTNOFF.Caption = Server1F.L104O1.Text
ROOM104.O2BTNOFF.Caption = Server1F.L104O2.Text
ROOM104.O3BTNOFF.Caption = Server1F.L104O3.Text
ROOM104.O4BTNOFF.Caption = Server1F.L104O4.Text
ROOM104.S1.Caption = Server1F.L104O1.Text
ROOM104.S2.Caption = Server1F.L104O2.Text
ROOM104.S3.Caption = Server1F.L104O3.Text
ROOM104.S4.Caption = Server1F.L104O4.Text
ROOM104.O1ELabel.Text = Server1F.L104O1.Text
ROOM104.O2ELabel.Text = Server1F.L104O2.Text
ROOM104.O3ELabel.Text = Server1F.L104O3.Text
ROOM104.O4ELabel.Text = Server1F.L104O4.Text
ROOM104.O1Delay.Caption = Server1F.OD104O1.Text & " Minute/s"
ROOM104.O2Delay.Caption = Server1F.OD104O2.Text & " Minute/s"
ROOM104.O3Delay.Caption = Server1F.OD104O3.Text & " Minute/s"
ROOM104.O4Delay.Caption = Server1F.OD104O4.Text & " Minute/s"
If ROOM104.Arduino.PortOpen = True Then
ROOM104.Arduino.PortOpen = False
Else
ROOM104.Arduino.RThreshold = 3
ROOM104.Arduino.Settings = "9600,n,8,1"
ROOM104.Arduino.CommPort = Server1F.C104.Text
ROOM104.Arduino.PortOpen = True
ROOM104.Arduino.DTREnable = False
ROOM104.Show 1, S1Floor
End If
End Sub

Private Sub BTN105_Click()


Server1F.DB105.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
Server1F.DB105.Refresh
Server1F.L105O1.Text = Server1F.DB105.Recordset.Fields("O1LABEL")
Server1F.L105O2.Text = Server1F.DB105.Recordset.Fields("O2LABEL")
Server1F.L105O3.Text = Server1F.DB105.Recordset.Fields("O3LABEL")
112

Server1F.L105O4.Text = Server1F.DB105.Recordset.Fields("O4LABEL")
Server1F.S105.Text = Server1F.DB105.Recordset.Fields("STATUS")
Server1F.C105.Text = Server1F.DB105.Recordset.Fields("COMPORT")
Server1F.O1S105.Text = Server1F.DB105.Recordset.Fields("O1STATUS")
Server1F.O2S105.Text = Server1F.DB105.Recordset.Fields("O2STATUS")
Server1F.O3S105.Text = Server1F.DB105.Recordset.Fields("O3STATUS")
Server1F.O4S105.Text = Server1F.DB105.Recordset.Fields("O4STATUS")
Server1F.OD105O1.Text = Server1F.DB105.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD105O2.Text = Server1F.DB105.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD105O3.Text = Server1F.DB105.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD105O4.Text = Server1F.DB105.Recordset.Fields("O4OUTPUTDELAY")
ROOM105.ROOMLABEL.Caption = BTN105.Caption
ROOM105.O1BTN.Caption = Server1F.L105O1.Text
ROOM105.O2BTN.Caption = Server1F.L105O2.Text
ROOM105.O3BTN.Caption = Server1F.L105O3.Text
ROOM105.O4BTN.Caption = Server1F.L105O4.Text
ROOM105.O1BTNOFF.Caption = Server1F.L105O1.Text
ROOM105.O2BTNOFF.Caption = Server1F.L105O2.Text
ROOM105.O3BTNOFF.Caption = Server1F.L105O3.Text
ROOM105.O4BTNOFF.Caption = Server1F.L105O4.Text
ROOM105.S1.Caption = Server1F.L105O1.Text
ROOM105.S2.Caption = Server1F.L105O2.Text
ROOM105.S3.Caption = Server1F.L105O3.Text
ROOM105.S4.Caption = Server1F.L105O4.Text
ROOM105.O1ELabel.Text = Server1F.L105O1.Text
ROOM105.O2ELabel.Text = Server1F.L105O2.Text
ROOM105.O3ELabel.Text = Server1F.L105O3.Text
ROOM105.O4ELabel.Text = Server1F.L105O4.Text
ROOM105.O1Delay.Caption = Server1F.OD105O1.Text & " Minute/s"
ROOM105.O2Delay.Caption = Server1F.OD105O2.Text & " Minute/s"
ROOM105.O3Delay.Caption = Server1F.OD105O3.Text & " Minute/s"
ROOM105.O4Delay.Caption = Server1F.OD105O4.Text & " Minute/s"
If ROOM105.Arduino.PortOpen = True Then
ROOM105.Arduino.PortOpen = False
Else
ROOM105.Arduino.RThreshold = 3
ROOM105.Arduino.Settings = "9600,n,8,1"
ROOM105.Arduino.CommPort = Server1F.C105.Text
ROOM105.Arduino.PortOpen = True
ROOM105.Arduino.DTREnable = False
ROOM105.Show 1, S1Floor
End If
End Sub

Private Sub BTN1FCR_Click()


Server1F.DB1FCR.RecordSource = "Select * from Config where ROOMS='" + "1F CR" +
"'"
Server1F.DB1FCR.Refresh
Server1F.L1FCRO1.Text = Server1F.DB1FCR.Recordset.Fields("O1LABEL")
Server1F.L1FcrO2.Text = Server1F.DB1FCR.Recordset.Fields("O2LABEL")
Server1F.L1FCRO3.Text = Server1F.DB1FCR.Recordset.Fields("O3LABEL")
113

Server1F.L1FCRO4.Text = Server1F.DB1FCR.Recordset.Fields("O4LABEL")
Server1F.S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("STATUS")
Server1F.C1FCR.Text = Server1F.DB1FCR.Recordset.Fields("COMPORT")
Server1F.O1S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O1STATUS")
Server1F.O2S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O2STATUS")
Server1F.O3S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O3STATUS")
Server1F.O4S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O4STATUS")
Server1F.OD1FCRO1.Text =
Server1F.DB1FCR.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD1FCRO2.Text =
Server1F.DB1FCR.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD1FCRO3.Text =
Server1F.DB1FCR.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD1FCRO4.Text =
Server1F.DB1FCR.Recordset.Fields("O4OUTPUTDELAY")
ROOM1FCR.ROOMLABEL.Caption = BTN1FCR.Caption
ROOM1FCR.O1BTN.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.O2BTN.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.O3BTN.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.O4BTN.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.O1BTNOFF.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.O2BTNOFF.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.O3BTNOFF.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.O4BTNOFF.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.S1.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.S2.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.S3.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.S4.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.O1ELabel.Text = Server1F.L1FCRO1.Text
ROOM1FCR.O2ELabel.Text = Server1F.L1FcrO2.Text
ROOM1FCR.O3ELabel.Text = Server1F.L1FCRO3.Text
ROOM1FCR.O4ELabel.Text = Server1F.L1FCRO4.Text
ROOM1FCR.O1Delay.Caption = Server1F.OD1FCRO1.Text & " Minute/s"
ROOM1FCR.O2Delay.Caption = Server1F.OD1FCRO2.Text & " Minute/s"
ROOM1FCR.O3Delay.Caption = Server1F.OD1FCRO3.Text & " Minute/s"
ROOM1FCR.O4Delay.Caption = Server1F.OD1FCRO4.Text & " Minute/s"
If ROOM1FCR.Arduino.PortOpen = True Then
ROOM1FCR.Arduino.PortOpen = False
Else
ROOM1FCR.Arduino.RThreshold = 3
ROOM1FCR.Arduino.Settings = "9600,n,8,1"
ROOM1FCR.Arduino.CommPort = Server1F.C1FCR.Text
ROOM1FCR.Arduino.PortOpen = True
ROOM1FCR.Arduino.DTREnable = False
ROOM1FCR.Show 1, S1Floor
End If

End Sub

Private Sub BTN1FHW_Click()


114

Server1F.DB1FHW.RecordSource = "Select * from Config where ROOMS='" + "1F


HALLWAY" + "'"
Server1F.DB1FHW.Refresh
Server1F.L1FHWO1.Text = Server1F.DB1FHW.Recordset.Fields("O1LABEL")
Server1F.L1FHWO2.Text = Server1F.DB1FHW.Recordset.Fields("O2LABEL")
Server1F.L1FHWO3.Text = Server1F.DB1FHW.Recordset.Fields("O3LABEL")
Server1F.L1FHWO4.Text = Server1F.DB1FHW.Recordset.Fields("O4LABEL")
Server1F.S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("STATUS")
Server1F.C1FHW.Text = Server1F.DB1FHW.Recordset.Fields("COMPORT")
Server1F.O1S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O1STATUS")
Server1F.O2S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O2STATUS")
Server1F.O3S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O3STATUS")
Server1F.O4S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O4STATUS")
Server1F.OD1FHWO1.Text =
Server1F.DB1FHW.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD1FHWO2.Text =
Server1F.DB1FHW.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD1FHWO3.Text =
Server1F.DB1FHW.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD1FHWO4.Text =
Server1F.DB1FHW.Recordset.Fields("O4OUTPUTDELAY")
ROOM1FHW.ROOMLABEL.Caption = BTN1FHW.Caption
ROOM1FHW.O1BTN.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.O2BTN.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.O3BTN.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.O4BTN.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.O1BTNOFF.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.O2BTNOFF.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.O3BTNOFF.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.O4BTNOFF.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.S1.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.S2.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.S3.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.S4.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.O1ELabel.Text = Server1F.L1FHWO1.Text
ROOM1FHW.O2ELabel.Text = Server1F.L1FHWO2.Text
ROOM1FHW.O3ELabel.Text = Server1F.L1FHWO3.Text
ROOM1FHW.O4ELabel.Text = Server1F.L1FHWO4.Text
ROOM1FHW.O1Delay.Caption = Server1F.OD1FHWO1.Text & " Minute/s"
ROOM1FHW.O2Delay.Caption = Server1F.OD1FHWO2.Text & " Minute/s"
ROOM1FHW.O3Delay.Caption = Server1F.OD1FHWO3.Text & " Minute/s"
ROOM1FHW.O4Delay.Caption = Server1F.OD1FHWO4.Text & " Minute/s"
If ROOM1FHW.Arduino.PortOpen = True Then
ROOM1FHW.Arduino.PortOpen = False
Else
ROOM1FHW.Arduino.RThreshold = 3
ROOM1FHW.Arduino.Settings = "9600,n,8,1"
ROOM1FHW.Arduino.CommPort = Server1F.C1FHW.Text
ROOM1FHW.Arduino.PortOpen = True
ROOM1FHW.Arduino.DTREnable = False
ROOM1FHW.Show 1, S1Floor
115

End If
End Sub

Private Sub BTNClinic_Click()


Server1F.DBCLINIC.RecordSource = "Select * from Config where ROOMS='" +
"CLINIC" + "'"
Server1F.DBCLINIC.Refresh
Server1F.LCLINICO1.Text = Server1F.DBCLINIC.Recordset.Fields("O1LABEL")
Server1F.LCLINICO2.Text = Server1F.DBCLINIC.Recordset.Fields("O2LABEL")
Server1F.LCLINICO3.Text = Server1F.DBCLINIC.Recordset.Fields("O3LABEL")
Server1F.LCLINICO4.Text = Server1F.DBCLINIC.Recordset.Fields("O4LABEL")
Server1F.SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("STATUS")
Server1F.CCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("COMPORT")
Server1F.O1SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O1STATUS")
Server1F.O2SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O2STATUS")
Server1F.O3SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O3STATUS")
Server1F.O4SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O4STATUS")
Server1F.ODCLINICO1.Text =
Server1F.DBCLINIC.Recordset.Fields("O1OUTPUTDELAY")
Server1F.ODCLINICO2.Text =
Server1F.DBCLINIC.Recordset.Fields("O2OUTPUTDELAY")
Server1F.ODCLINICO3.Text =
Server1F.DBCLINIC.Recordset.Fields("O3OUTPUTDELAY")
Server1F.ODCLINICO4.Text =
Server1F.DBCLINIC.Recordset.Fields("O4OUTPUTDELAY")
ROOMCLINIC.ROOMLABEL.Caption = BTNCLINIC.Caption
ROOMCLINIC.O1BTN.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.O2BTN.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.O3BTN.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.O4BTN.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.O1BTNOFF.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.O2BTNOFF.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.O3BTNOFF.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.O4BTNOFF.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.S1.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.S2.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.S3.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.S4.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.O1ELabel.Text = Server1F.LCLINICO1.Text
ROOMCLINIC.O2ELabel.Text = Server1F.LCLINICO2.Text
ROOMCLINIC.O3ELabel.Text = Server1F.LCLINICO3.Text
ROOMCLINIC.O4ELabel.Text = Server1F.LCLINICO4.Text
ROOMCLINIC.O1Delay.Caption = Server1F.ODCLINICO1.Text & " Minute/s"
ROOMCLINIC.O2Delay.Caption = Server1F.ODCLINICO2.Text & " Minute/s"
ROOMCLINIC.O3Delay.Caption = Server1F.ODCLINICO3.Text & " Minute/s"
ROOMCLINIC.O4Delay.Caption = Server1F.ODCLINICO4.Text & " Minute/s"
If ROOMCLINIC.Arduino.PortOpen = True Then
ROOMCLINIC.Arduino.PortOpen = False
Else
ROOMCLINIC.Arduino.RThreshold = 3
ROOMCLINIC.Arduino.Settings = "9600,n,8,1"
116

ROOMCLINIC.Arduino.CommPort = Server1F.CCLINIC.Text
ROOMCLINIC.Arduino.PortOpen = True
ROOMCLINIC.Arduino.DTREnable = False
ROOMCLINIC.Show 1, S1Floor
End If

End Sub

Private Sub CloseBTN_Click()


Me.Hide
MainMenu.Show
End Sub

Private Sub Form_Activate()


S1Floor.BTN101.BackColor = RGB(0, 126, 255)
S1Floor.BTN101.BackOver = RGB(0, 126, 255)
S1Floor.BTN102.BackColor = RGB(0, 126, 255)
S1Floor.BTN102.BackOver = RGB(0, 126, 255)
S1Floor.BTN103.BackColor = RGB(0, 126, 255)
S1Floor.BTN103.BackOver = RGB(0, 126, 255)
S1Floor.BTN104.BackColor = RGB(0, 126, 255)
S1Floor.BTN104.BackOver = RGB(0, 126, 255)
S1Floor.BTN105.BackColor = RGB(0, 126, 255)
S1Floor.BTN105.BackOver = RGB(0, 126, 255)
S1Floor.BTN1FCR.BackColor = RGB(0, 126, 255)
S1Floor.BTN1FCR.BackOver = RGB(0, 126, 255)
S1Floor.BTN1FHW.BackColor = RGB(0, 126, 255)
S1Floor.BTN1FHW.BackOver = RGB(0, 126, 255)
S1Floor.BTNCLINIC.BackColor = RGB(0, 126, 255)
S1Floor.BTNCLINIC.BackOver = RGB(0, 126, 255)
With Server1F
.DataBTN.Value = True
If .SS101.Text = "ACTIVATED" Then
S1Floor.BTN101.BackColor = RGB(78, 0, 255)
S1Floor.BTN101.BackOver = RGB(0, 126, 255)
End If
If .SS102.Text = "ACTIVATED" Then
S1Floor.BTN102.BackColor = RGB(78, 0, 255)
S1Floor.BTN102.BackOver = RGB(0, 126, 255)
End If
If .SS103.Text = "ACTIVATED" Then
S1Floor.BTN103.BackColor = RGB(78, 0, 255)
S1Floor.BTN103.BackOver = RGB(0, 126, 255)
End If
If .SS104.Text = "ACTIVATED" Then
S1Floor.BTN104.BackColor = RGB(78, 0, 255)
S1Floor.BTN104.BackOver = RGB(0, 126, 255)
End If
If .SS105.Text = "ACTIVATED" Then
S1Floor.BTN105.BackColor = RGB(78, 0, 255)
S1Floor.BTN105.BackOver = RGB(0, 126, 255)
117

End If
If .SS1FCR.Text = "ACTIVATED" Then
S1Floor.BTN1FCR.BackColor = RGB(78, 0, 255)
S1Floor.BTN1FCR.BackOver = RGB(0, 126, 255)
End If
If .SS1FHW.Text = "ACTIVATED" Then
S1Floor.BTN1FHW.BackColor = RGB(78, 0, 255)
S1Floor.BTN1FHW.BackOver = RGB(0, 126, 255)
End If
If .SSCLINIC.Text = "ACTIVATED" Then
S1Floor.BTNCLINIC.BackColor = RGB(78, 0, 255)
S1Floor.BTNCLINIC.BackOver = RGB(0, 126, 255)
End If
If .S101.Text = "DEACTIVATED" Then
S1Floor.BTN101.BackColor = RGB(255, 102, 0)
S1Floor.BTN101.Enabled = False
End If
If .S102.Text = "DEACTIVATED" Then
S1Floor.BTN102.BackColor = RGB(255, 102, 0)
S1Floor.BTN102.Enabled = False
End If
If .S103.Text = "DEACTIVATED" Then
S1Floor.BTN103.BackColor = RGB(255, 102, 0)
S1Floor.BTN103.Enabled = False
End If
If .S104.Text = "DEACTIVATED" Then
S1Floor.BTN104.BackColor = RGB(255, 102, 0)
S1Floor.BTN104.Enabled = False
End If
If .S105.Text = "DEACTIVATED" Then
S1Floor.BTN105.BackColor = RGB(255, 102, 0)
S1Floor.BTN105.Enabled = False
End If
If .S1FCR.Text = "DEACTIVATED" Then
S1Floor.BTN1FCR.BackColor = RGB(255, 102, 0)
S1Floor.BTN1FCR.Enabled = False
End If
If .S1FHW.Text = "DEACTIVATED" Then
S1Floor.BTN1FHW.BackColor = RGB(255, 102, 0)
S1Floor.BTN1FHW.Enabled = False
End If
If .SCLINIC.Text = "DEACTIVATED" Then
S1Floor.BTNCLINIC.BackColor = RGB(255, 102, 0)
S1Floor.BTNCLINIC.Enabled = False
End If
If .S101.Text = "ACTIVATED" Then
S1Floor.BTN101.Enabled = True
End If
If .S102.Text = "ACTIVATED" Then
S1Floor.BTN102.Enabled = True
End If
118

If .S103.Text = "ACTIVATED" Then


S1Floor.BTN103.Enabled = True
End If
If .S104.Text = "ACTIVATED" Then
S1Floor.BTN104.Enabled = True
End If
If .S105.Text = "ACTIVATED" Then
S1Floor.BTN105.Enabled = True
End If
If .S1FCR.Text = "ACTIVATED" Then
S1Floor.BTN1FCR.Enabled = True
End If
If .S1FHW.Text = "ACTIVATED" Then
S1Floor.BTN1FHW.Enabled = True
End If
If .SCLINIC.Text = "ACTIVATED" Then
S1Floor.BTNCLINIC.Enabled = True
End If
End With
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
End Sub

Private Sub Form_Unload(Cancel As Integer)


Me.Hide
MainMenu.Show
End Sub

Private Sub Ladder_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Ladder.Picture = LoadPicture(App.Path & "/Animations/ICONS/Ladder/Ladder.jpg")
End Sub

Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Ladder.Picture = LoadPicture(App.Path & "/Animations/ICONS/Ladder/Ladder.jpg")
End Sub

Private Sub R101_Click()


Server1F.DB101.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
Server1F.DB101.Refresh
Server1F.L101O1.Text = Server1F.DB101.Recordset.Fields("O1LABEL")
Server1F.L101O2.Text = Server1F.DB101.Recordset.Fields("O2LABEL")
Server1F.L101O3.Text = Server1F.DB101.Recordset.Fields("O3LABEL")
Server1F.L101O4.Text = Server1F.DB101.Recordset.Fields("O4LABEL")
Server1F.S101.Text = Server1F.DB101.Recordset.Fields("STATUS")
Server1F.C101.Text = Server1F.DB101.Recordset.Fields("COMPORT")
Server1F.O1S101.Text = Server1F.DB101.Recordset.Fields("O1STATUS")
119

Server1F.O2S101.Text = Server1F.DB101.Recordset.Fields("O2STATUS")
Server1F.O3S101.Text = Server1F.DB101.Recordset.Fields("O3STATUS")
Server1F.O4S101.Text = Server1F.DB101.Recordset.Fields("O4STATUS")
Server1F.OD101O1.Text = Server1F.DB101.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD101O2.Text = Server1F.DB101.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD101O3.Text = Server1F.DB101.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD101O4.Text = Server1F.DB101.Recordset.Fields("O4OUTPUTDELAY")
ROOM101.O1BTN.Caption = Server1F.L101O1.Text
ROOM101.O2BTN.Caption = Server1F.L101O2.Text
ROOM101.O3BTN.Caption = Server1F.L101O3.Text
ROOM101.O4BTN.Caption = Server1F.L101O4.Text
ROOM101.O1BTNOFF.Caption = Server1F.L101O1.Text
ROOM101.O2BTNOFF.Caption = Server1F.L101O2.Text
ROOM101.O3BTNOFF.Caption = Server1F.L101O3.Text
ROOM101.O4BTNOFF.Caption = Server1F.L101O4.Text
ROOM101.S1.Caption = Server1F.L101O1.Text
ROOM101.S2.Caption = Server1F.L101O2.Text
ROOM101.S3.Caption = Server1F.L101O3.Text
ROOM101.S4.Caption = Server1F.L101O4.Text
ROOM101.O1Delay.Caption = Server1F.OD101O1.Text & " Minute/s"
ROOM101.O2Delay.Caption = Server1F.OD101O2.Text & " Minute/s"
ROOM101.O3Delay.Caption = Server1F.OD101O3.Text & " Minute/s"
ROOM101.O4Delay.Caption = Server1F.OD101O4.Text & " Minute/s"
End Sub

Private Sub R102_Click()


Server1F.DB102.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
Server1F.DB102.Refresh
Server1F.L102O1.Text = Server1F.DB102.Recordset.Fields("O1LABEL")
Server1F.L102O2.Text = Server1F.DB102.Recordset.Fields("O2LABEL")
Server1F.L102O3.Text = Server1F.DB102.Recordset.Fields("O3LABEL")
Server1F.L102O4.Text = Server1F.DB102.Recordset.Fields("O4LABEL")
Server1F.S102.Text = Server1F.DB102.Recordset.Fields("STATUS")
Server1F.C102.Text = Server1F.DB102.Recordset.Fields("COMPORT")
Server1F.O1S102.Text = Server1F.DB102.Recordset.Fields("O1STATUS")
Server1F.O2S102.Text = Server1F.DB102.Recordset.Fields("O2STATUS")
Server1F.O3S102.Text = Server1F.DB102.Recordset.Fields("O3STATUS")
Server1F.O4S102.Text = Server1F.DB102.Recordset.Fields("O4STATUS")
Server1F.OD102O1.Text = Server1F.DB102.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD102O2.Text = Server1F.DB102.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD102O3.Text = Server1F.DB102.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD102O4.Text = Server1F.DB102.Recordset.Fields("O4OUTPUTDELAY")
ROOM102.O1BTN.Caption = Server1F.L102O1.Text
ROOM102.O2BTN.Caption = Server1F.L102O2.Text
ROOM102.O3BTN.Caption = Server1F.L102O3.Text
ROOM102.O4BTN.Caption = Server1F.L102O4.Text
ROOM102.O1BTNOFF.Caption = Server1F.L102O1.Text
ROOM102.O2BTNOFF.Caption = Server1F.L102O2.Text
ROOM102.O3BTNOFF.Caption = Server1F.L102O3.Text
ROOM102.O4BTNOFF.Caption = Server1F.L102O4.Text
ROOM102.S1.Caption = Server1F.L102O1.Text
120

ROOM102.S2.Caption = Server1F.L102O2.Text
ROOM102.S3.Caption = Server1F.L102O3.Text
ROOM102.S4.Caption = Server1F.L102O4.Text
ROOM102.O1Delay.Caption = Server1F.OD102O1.Text & " Minute/s"
ROOM102.O2Delay.Caption = Server1F.OD102O2.Text & " Minute/s"
ROOM102.O3Delay.Caption = Server1F.OD102O3.Text & " Minute/s"
ROOM102.O4Delay.Caption = Server1F.OD102O4.Text & " Minute/s"

End Sub

Private Sub R103_Click()


Server1F.DB103.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
Server1F.DB103.Refresh
Server1F.L103O1.Text = Server1F.DB103.Recordset.Fields("O1LABEL")
Server1F.L103O2.Text = Server1F.DB103.Recordset.Fields("O2LABEL")
Server1F.L103O3.Text = Server1F.DB103.Recordset.Fields("O3LABEL")
Server1F.L103O4.Text = Server1F.DB103.Recordset.Fields("O4LABEL")
Server1F.S103.Text = Server1F.DB103.Recordset.Fields("STATUS")
Server1F.C103.Text = Server1F.DB103.Recordset.Fields("COMPORT")
Server1F.O1S103.Text = Server1F.DB103.Recordset.Fields("O1STATUS")
Server1F.O2S103.Text = Server1F.DB103.Recordset.Fields("O2STATUS")
Server1F.O3S103.Text = Server1F.DB103.Recordset.Fields("O3STATUS")
Server1F.O4S103.Text = Server1F.DB103.Recordset.Fields("O4STATUS")
Server1F.OD103O1.Text = Server1F.DB103.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD103O2.Text = Server1F.DB103.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD103O3.Text = Server1F.DB103.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD103O4.Text = Server1F.DB103.Recordset.Fields("O4OUTPUTDELAY")
ROOM103.O1BTN.Caption = Server1F.L103O1.Text
ROOM103.O2BTN.Caption = Server1F.L103O2.Text
ROOM103.O3BTN.Caption = Server1F.L103O3.Text
ROOM103.O4BTN.Caption = Server1F.L103O4.Text
ROOM103.O1BTNOFF.Caption = Server1F.L103O1.Text
ROOM103.O2BTNOFF.Caption = Server1F.L103O2.Text
ROOM103.O3BTNOFF.Caption = Server1F.L103O3.Text
ROOM103.O4BTNOFF.Caption = Server1F.L103O4.Text
ROOM103.S1.Caption = Server1F.L103O1.Text
ROOM103.S2.Caption = Server1F.L103O2.Text
ROOM103.S3.Caption = Server1F.L103O3.Text
ROOM103.S4.Caption = Server1F.L103O4.Text
ROOM103.O1Delay.Caption = Server1F.OD103O1.Text & " Minute/s"
ROOM103.O2Delay.Caption = Server1F.OD103O2.Text & " Minute/s"
ROOM103.O3Delay.Caption = Server1F.OD103O3.Text & " Minute/s"
ROOM103.O4Delay.Caption = Server1F.OD103O4.Text & " Minute/s"

End Sub

Private Sub R104_Click()


Server1F.DB104.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
Server1F.DB104.Refresh
Server1F.L104O1.Text = Server1F.DB104.Recordset.Fields("O1LABEL")
Server1F.L104O2.Text = Server1F.DB104.Recordset.Fields("O2LABEL")
121

Server1F.L104O3.Text = Server1F.DB104.Recordset.Fields("O3LABEL")
Server1F.L104O4.Text = Server1F.DB104.Recordset.Fields("O4LABEL")
Server1F.S104.Text = Server1F.DB104.Recordset.Fields("STATUS")
Server1F.C104.Text = Server1F.DB104.Recordset.Fields("COMPORT")
Server1F.O1S104.Text = Server1F.DB104.Recordset.Fields("O1STATUS")
Server1F.O2S104.Text = Server1F.DB104.Recordset.Fields("O2STATUS")
Server1F.O3S104.Text = Server1F.DB104.Recordset.Fields("O3STATUS")
Server1F.O4S104.Text = Server1F.DB104.Recordset.Fields("O4STATUS")
Server1F.OD104O1.Text = Server1F.DB104.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD104O2.Text = Server1F.DB104.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD104O3.Text = Server1F.DB104.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD104O4.Text = Server1F.DB104.Recordset.Fields("O4OUTPUTDELAY")
ROOM104.O1BTN.Caption = Server1F.L104O1.Text
ROOM104.O2BTN.Caption = Server1F.L104O2.Text
ROOM104.O3BTN.Caption = Server1F.L104O3.Text
ROOM104.O4BTN.Caption = Server1F.L104O4.Text
ROOM104.O1BTNOFF.Caption = Server1F.L104O1.Text
ROOM104.O2BTNOFF.Caption = Server1F.L104O2.Text
ROOM104.O3BTNOFF.Caption = Server1F.L104O3.Text
ROOM104.O4BTNOFF.Caption = Server1F.L104O4.Text
ROOM104.S1.Caption = Server1F.L104O1.Text
ROOM104.S2.Caption = Server1F.L104O2.Text
ROOM104.S3.Caption = Server1F.L104O3.Text
ROOM104.S4.Caption = Server1F.L104O4.Text
ROOM104.O1Delay.Caption = Server1F.OD104O1.Text & " Minute/s"
ROOM104.O2Delay.Caption = Server1F.OD104O2.Text & " Minute/s"
ROOM104.O3Delay.Caption = Server1F.OD104O3.Text & " Minute/s"
ROOM104.O4Delay.Caption = Server1F.OD104O4.Text & " Minute/s"

End Sub

Private Sub R105_Click()


Server1F.DB105.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
Server1F.DB105.Refresh
Server1F.L105O1.Text = Server1F.DB105.Recordset.Fields("O1LABEL")
Server1F.L105O2.Text = Server1F.DB105.Recordset.Fields("O2LABEL")
Server1F.L105O3.Text = Server1F.DB105.Recordset.Fields("O3LABEL")
Server1F.L105O4.Text = Server1F.DB105.Recordset.Fields("O4LABEL")
Server1F.S105.Text = Server1F.DB105.Recordset.Fields("STATUS")
Server1F.C105.Text = Server1F.DB105.Recordset.Fields("COMPORT")
Server1F.O1S105.Text = Server1F.DB105.Recordset.Fields("O1STATUS")
Server1F.O2S105.Text = Server1F.DB105.Recordset.Fields("O2STATUS")
Server1F.O3S105.Text = Server1F.DB105.Recordset.Fields("O3STATUS")
Server1F.O4S105.Text = Server1F.DB105.Recordset.Fields("O4STATUS")
Server1F.OD105O1.Text = Server1F.DB105.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD105O2.Text = Server1F.DB105.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD105O3.Text = Server1F.DB105.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD105O4.Text = Server1F.DB105.Recordset.Fields("O4OUTPUTDELAY")
ROOM105.O1BTN.Caption = Server1F.L105O1.Text
ROOM105.O2BTN.Caption = Server1F.L105O2.Text
ROOM105.O3BTN.Caption = Server1F.L105O3.Text
122

ROOM105.O4BTN.Caption = Server1F.L105O4.Text
ROOM105.O1BTNOFF.Caption = Server1F.L105O1.Text
ROOM105.O2BTNOFF.Caption = Server1F.L105O2.Text
ROOM105.O3BTNOFF.Caption = Server1F.L105O3.Text
ROOM105.O4BTNOFF.Caption = Server1F.L105O4.Text
ROOM105.S1.Caption = Server1F.L105O1.Text
ROOM105.S2.Caption = Server1F.L105O2.Text
ROOM105.S3.Caption = Server1F.L105O3.Text
ROOM105.S4.Caption = Server1F.L105O4.Text
ROOM105.O1Delay.Caption = Server1F.OD105O1.Text & " Minute/s"
ROOM105.O2Delay.Caption = Server1F.OD105O2.Text & " Minute/s"
ROOM105.O3Delay.Caption = Server1F.OD105O3.Text & " Minute/s"
ROOM105.O4Delay.Caption = Server1F.OD105O4.Text & " Minute/s"

End Sub

Private Sub R1FCR_Click()


Server1F.DB1FCR.RecordSource = "Select * from Config where ROOMS='" + "1F CR" +
"'"
Server1F.DB1FCR.Refresh
Server1F.L1FCRO1.Text = Server1F.DB1FCR.Recordset.Fields("O1LABEL")
Server1F.L1FcrO2.Text = Server1F.DB1FCR.Recordset.Fields("O2LABEL")
Server1F.L1FCRO3.Text = Server1F.DB1FCR.Recordset.Fields("O3LABEL")
Server1F.L1FCRO4.Text = Server1F.DB1FCR.Recordset.Fields("O4LABEL")
Server1F.S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("STATUS")
Server1F.C1FCR.Text = Server1F.DB1FCR.Recordset.Fields("COMPORT")
Server1F.O1S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O1STATUS")
Server1F.O2S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O2STATUS")
Server1F.O3S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O3STATUS")
Server1F.O4S1FCR.Text = Server1F.DB1FCR.Recordset.Fields("O4STATUS")
Server1F.OD1FCRO1.Text =
Server1F.DB1FCR.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD1FCRO2.Text =
Server1F.DB1FCR.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD1FCRO3.Text =
Server1F.DB1FCR.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD1FCRO4.Text =
Server1F.DB1FCR.Recordset.Fields("O4OUTPUTDELAY")
ROOM1FCR.O1BTN.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.O2BTN.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.O3BTN.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.O4BTN.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.O1BTNOFF.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.O2BTNOFF.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.O3BTNOFF.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.O4BTNOFF.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.S1.Caption = Server1F.L1FCRO1.Text
ROOM1FCR.S2.Caption = Server1F.L1FcrO2.Text
ROOM1FCR.S3.Caption = Server1F.L1FCRO3.Text
ROOM1FCR.S4.Caption = Server1F.L1FCRO4.Text
ROOM1FCR.O1Delay.Caption = Server1F.OD1FCRO1.Text & " Minute/s"
123

ROOM1FCR.O2Delay.Caption = Server1F.OD1FCRO2.Text & " Minute/s"


ROOM1FCR.O3Delay.Caption = Server1F.OD1FCRO3.Text & " Minute/s"
ROOM1FCR.O4Delay.Caption = Server1F.OD1FCRO4.Text & " Minute/s"
End Sub

Private Sub R1FHW_Click()


Server1F.DB1FHW.RecordSource = "Select * from Config where ROOMS='" + "1F
HALLWAY" + "'"
Server1F.DB1FHW.Refresh
Server1F.L1FHWO1.Text = Server1F.DB1FHW.Recordset.Fields("O1LABEL")
Server1F.L1FHWO2.Text = Server1F.DB1FHW.Recordset.Fields("O2LABEL")
Server1F.L1FHWO3.Text = Server1F.DB1FHW.Recordset.Fields("O3LABEL")
Server1F.L1FHWO4.Text = Server1F.DB1FHW.Recordset.Fields("O4LABEL")
Server1F.S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("STATUS")
Server1F.C1FHW.Text = Server1F.DB1FHW.Recordset.Fields("COMPORT")
Server1F.O1S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O1STATUS")
Server1F.O2S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O2STATUS")
Server1F.O3S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O3STATUS")
Server1F.O4S1FHW.Text = Server1F.DB1FHW.Recordset.Fields("O4STATUS")
Server1F.OD1FHWO1.Text =
Server1F.DB1FHW.Recordset.Fields("O1OUTPUTDELAY")
Server1F.OD1FHWO2.Text =
Server1F.DB1FHW.Recordset.Fields("O2OUTPUTDELAY")
Server1F.OD1FHWO3.Text =
Server1F.DB1FHW.Recordset.Fields("O3OUTPUTDELAY")
Server1F.OD1FHWO4.Text =
Server1F.DB1FHW.Recordset.Fields("O4OUTPUTDELAY")
ROOM1FHW.O1BTN.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.O2BTN.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.O3BTN.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.O4BTN.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.O1BTNOFF.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.O2BTNOFF.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.O3BTNOFF.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.O4BTNOFF.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.S1.Caption = Server1F.L1FHWO1.Text
ROOM1FHW.S2.Caption = Server1F.L1FHWO2.Text
ROOM1FHW.S3.Caption = Server1F.L1FHWO3.Text
ROOM1FHW.S4.Caption = Server1F.L1FHWO4.Text
ROOM1FHW.O1Delay.Caption = Server1F.OD1FHWO1.Text & " Minute/s"
ROOM1FHW.O2Delay.Caption = Server1F.OD1FHWO2.Text & " Minute/s"
ROOM1FHW.O3Delay.Caption = Server1F.OD1FHWO3.Text & " Minute/s"
ROOM1FHW.O4Delay.Caption = Server1F.OD1FHWO4.Text & " Minute/s"

End Sub

Private Sub RCLINIC_Click()


Server1F.DBCLINIC.RecordSource = "Select * from Config where ROOMS='" +
"CLINIC" + "'"
Server1F.DBCLINIC.Refresh
Server1F.LCLINICO1.Text = Server1F.DBCLINIC.Recordset.Fields("O1LABEL")
124

Server1F.LCLINICO2.Text = Server1F.DBCLINIC.Recordset.Fields("O2LABEL")
Server1F.LCLINICO3.Text = Server1F.DBCLINIC.Recordset.Fields("O3LABEL")
Server1F.LCLINICO4.Text = Server1F.DBCLINIC.Recordset.Fields("O4LABEL")
Server1F.SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("STATUS")
Server1F.CCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("COMPORT")
Server1F.O1SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O1STATUS")
Server1F.O2SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O2STATUS")
Server1F.O3SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O3STATUS")
Server1F.O4SCLINIC.Text = Server1F.DBCLINIC.Recordset.Fields("O4STATUS")
Server1F.ODCLINICO1.Text =
Server1F.DBCLINIC.Recordset.Fields("O1OUTPUTDELAY")
Server1F.ODCLINICO2.Text =
Server1F.DBCLINIC.Recordset.Fields("O2OUTPUTDELAY")
Server1F.ODCLINICO3.Text =
Server1F.DBCLINIC.Recordset.Fields("O3OUTPUTDELAY")
Server1F.ODCLINICO4.Text =
Server1F.DBCLINIC.Recordset.Fields("O4OUTPUTDELAY")
ROOMCLINIC.O1BTN.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.O2BTN.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.O3BTN.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.O4BTN.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.O1BTNOFF.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.O2BTNOFF.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.O3BTNOFF.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.O4BTNOFF.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.S1.Caption = Server1F.LCLINICO1.Text
ROOMCLINIC.S2.Caption = Server1F.LCLINICO2.Text
ROOMCLINIC.S3.Caption = Server1F.LCLINICO3.Text
ROOMCLINIC.S4.Caption = Server1F.LCLINICO4.Text
ROOMCLINIC.O1Delay.Caption = Server1F.ODCLINICO1.Text & " Minute/s"
ROOMCLINIC.O2Delay.Caption = Server1F.ODCLINICO2.Text & " Minute/s"
ROOMCLINIC.O3Delay.Caption = Server1F.ODCLINICO3.Text & " Minute/s"
ROOMCLINIC.O4Delay.Caption = Server1F.ODCLINICO4.Text & " Minute/s"

End Sub

Private Sub Up_Click()


Me.Hide
S2Floor.Show
End Sub

Private Sub Up_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Ladder.Picture = LoadPicture(App.Path & "/Animations/ICONS/Ladder/UPFocus.jpg")
End Sub
Private Sub DataBTN_Click()
Ado1F.RecordSource = "Select * from Config where ROOMS='" + R101.Text + "'"
Ado1F.Refresh
S101.Text = Ado1F.Recordset.Fields("STATUS")
C101.Text = Ado1F.Recordset.Fields("COMPORT")
125

SS101.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L101O1.Text = Ado1F.Recordset.Fields("O1LABEL")
L101O2.Text = Ado1F.Recordset.Fields("O2LABEL")
L101O3.Text = Ado1F.Recordset.Fields("O3LABEL")
L101O4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S101.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S101.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S101.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S101.Text = Ado1F.Recordset.Fields("O4STATUS")
OD101O1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD101O2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD101O3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD101O4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + R102.Text + "'"
Ado1F.Refresh
S102.Text = Ado1F.Recordset.Fields("STATUS")
C102.Text = Ado1F.Recordset.Fields("COMPORT")
SS102.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L102O1.Text = Ado1F.Recordset.Fields("O1LABEL")
L102O2.Text = Ado1F.Recordset.Fields("O2LABEL")
L102O3.Text = Ado1F.Recordset.Fields("O3LABEL")
L102O4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S102.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S102.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S102.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S102.Text = Ado1F.Recordset.Fields("O4STATUS")
OD102O1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD102O2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD102O3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD102O4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + R103.Text + "'"
Ado1F.Refresh
S103.Text = Ado1F.Recordset.Fields("STATUS")
C103.Text = Ado1F.Recordset.Fields("COMPORT")
SS103.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L103O1.Text = Ado1F.Recordset.Fields("O1LABEL")
L103O2.Text = Ado1F.Recordset.Fields("O2LABEL")
L103O3.Text = Ado1F.Recordset.Fields("O3LABEL")
L103O4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S103.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S103.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S103.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S103.Text = Ado1F.Recordset.Fields("O4STATUS")
OD103O1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD103O2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD103O3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD103O4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + R104.Text + "'"
Ado1F.Refresh
S104.Text = Ado1F.Recordset.Fields("STATUS")
C104.Text = Ado1F.Recordset.Fields("COMPORT")
126

SS104.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L104O1.Text = Ado1F.Recordset.Fields("O1LABEL")
L104O2.Text = Ado1F.Recordset.Fields("O2LABEL")
L104O3.Text = Ado1F.Recordset.Fields("O3LABEL")
L104O4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S104.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S104.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S104.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S104.Text = Ado1F.Recordset.Fields("O4STATUS")
OD104O1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD104O2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD104O3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD104O4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + R105.Text + "'"
Ado1F.Refresh
S105.Text = Ado1F.Recordset.Fields("STATUS")
C105.Text = Ado1F.Recordset.Fields("COMPORT")
SS105.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L105O1.Text = Ado1F.Recordset.Fields("O1LABEL")
L105O2.Text = Ado1F.Recordset.Fields("O2LABEL")
L105O3.Text = Ado1F.Recordset.Fields("O3LABEL")
L105O4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S105.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S105.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S105.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S105.Text = Ado1F.Recordset.Fields("O4STATUS")
OD105O1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD105O2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD105O3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD105O4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + CR1F.Text + "'"
Ado1F.Refresh
S1FCR.Text = Ado1F.Recordset.Fields("STATUS")
C1FCR.Text = Ado1F.Recordset.Fields("COMPORT")
SS1FCR.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L1FCRO1.Text = Ado1F.Recordset.Fields("O1LABEL")
L1FcrO2.Text = Ado1F.Recordset.Fields("O2LABEL")
L1FCRO3.Text = Ado1F.Recordset.Fields("O3LABEL")
L1FCRO4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S1FCR.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S1FCR.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S1FCR.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S1FCR.Text = Ado1F.Recordset.Fields("O4STATUS")
OD1FCRO1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD1FCRO2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD1FCRO3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD1FCRO4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + HW1F.Text + "'"
Ado1F.Refresh
S1FHW.Text = Ado1F.Recordset.Fields("STATUS")
C1FHW.Text = Ado1F.Recordset.Fields("COMPORT")
127

SS1FHW.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
L1FHWO1.Text = Ado1F.Recordset.Fields("O1LABEL")
L1FHWO2.Text = Ado1F.Recordset.Fields("O2LABEL")
L1FHWO3.Text = Ado1F.Recordset.Fields("O3LABEL")
L1FHWO4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1S1FHW.Text = Ado1F.Recordset.Fields("O1STATUS")
O2S1FHW.Text = Ado1F.Recordset.Fields("O2STATUS")
O3S1FHW.Text = Ado1F.Recordset.Fields("O3STATUS")
O4S1FHW.Text = Ado1F.Recordset.Fields("O4STATUS")
OD1FHWO1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
OD1FHWO2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
OD1FHWO3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
OD1FHWO4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
Ado1F.RecordSource = "Select * from Config where ROOMS='" + CLINIC.Text + "'"
Ado1F.Refresh
SCLINIC.Text = Ado1F.Recordset.Fields("STATUS")
CCLINIC.Text = Ado1F.Recordset.Fields("COMPORT")
SSCLINIC.Text = Ado1F.Recordset.Fields("SWITCHSCHEDULE")
LCLINICO1.Text = Ado1F.Recordset.Fields("O1LABEL")
LCLINICO2.Text = Ado1F.Recordset.Fields("O2LABEL")
LCLINICO3.Text = Ado1F.Recordset.Fields("O3LABEL")
LCLINICO4.Text = Ado1F.Recordset.Fields("O4LABEL")
O1SCLINIC.Text = Ado1F.Recordset.Fields("O1STATUS")
O2SCLINIC.Text = Ado1F.Recordset.Fields("O2STATUS")
O3SCLINIC.Text = Ado1F.Recordset.Fields("O3STATUS")
O4SCLINIC.Text = Ado1F.Recordset.Fields("O4STATUS")
ODCLINICO1.Text = Ado1F.Recordset.Fields("O1OUTPUTDELAY")
ODCLINICO2.Text = Ado1F.Recordset.Fields("O2OUTPUTDELAY")
ODCLINICO3.Text = Ado1F.Recordset.Fields("O3OUTPUTDELAY")
ODCLINICO4.Text = Ado1F.Recordset.Fields("O4OUTPUTDELAY")
End Sub

Private Sub Form_Load()


Ado1F.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB101.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB102.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB103.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB104.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB105.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB1FCR.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DB1FHW.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
DBCLINIC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
128

End Sub
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "user32" ()
Const WM_NCLBUTTONDOWN = &HA1
Const HTCAPTION = 2

Private Sub CloseBTN_Click()


Unload Me
MainMenu.Show
End Sub

Private Sub DataGrid1_KeyDown(KeyCode As Integer, Shift As Integer)


ROOMLABEL.Caption = Device.Recordset.Fields("ROOMS")
ComPorts.Text = Device.Recordset.Fields("COMPORT")
DeviceStatus.Text = Device.Recordset.Fields("STATUS")
End Sub

Private Sub DataGrid1_KeyUp(KeyCode As Integer, Shift As Integer)


ROOMLABEL.Caption = Device.Recordset.Fields("ROOMS")
ComPorts.Text = Device.Recordset.Fields("COMPORT")
DeviceStatus.Text = Device.Recordset.Fields("STATUS")
End Sub

Private Sub DataGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y


As Single)
ROOMLABEL.Caption = Device.Recordset.Fields("ROOMS")
ComPorts.Text = Device.Recordset.Fields("COMPORT")
DeviceStatus.Text = Device.Recordset.Fields("STATUS")
End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)


ROOMLABEL.Caption = Device.Recordset.Fields("ROOMS")
ComPorts.Text = Device.Recordset.Fields("COMPORT")
DeviceStatus.Text = Device.Recordset.Fields("STATUS")
End Sub

Private Sub DeactivateBTN_Click()


Dim dd As Integer
dd = MsgBox("Do you want to DEACTIVATE this device?", vbInformation + vbYesNo,
"DEACTIVATE DEVICE")
If dd = vbYes Then
With Device
.Recordset.Fields("COMPORT") = "0"
.Recordset.Fields("STATUS") = "DEACTIVATED"
.Recordset.Update
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
ComPorts.Text = .Recordset.Fields("COMPORT")
129

DeviceStatus.Text = .Recordset.Fields("STATUS")
End With
End If
End Sub

Private Sub DeviceStatus_Change()


If DeviceStatus.Text = "" Then
SetupBTN.Enabled = False
EditBTN.Enabled = False
DeactivateBTN.Enabled = False
Else
SetupBTN.Enabled = True
EditBTN.Enabled = True
DeactivateBTN.Enabled = True
GoTo REFRESHSTATUS
End If

REFRESHSTATUS:

If DeviceStatus.Text = "ACTIVATED" Then


SetupBTN.Visible = False
EditBTN.Visible = True
DeactivateBTN.Enabled = True
End If
If DeviceStatus.Text = "DEACTIVATED" Then
SetupBTN.Visible = True
EditBTN.Visible = False
DeactivateBTN.Enabled = False
End If
End Sub

Private Sub DManagerHIDE_Click()


DeviceList.Hide
DManagerSHOW.Visible = True
DManagerHIDE.Visible = False
End Sub

Private Sub DManagerSHOW_Click()


DeviceList.Show
DManagerSHOW.Visible = False
DManagerHIDE.Visible = True
End Sub

Private Sub EditBTN_Click()


Dim EditBTN As Integer
EditBTN = MsgBox("Do you want to edit this setup?", vbInformation + vbYesNo, "EDIT
DEVICE")
If EditBTN = vbYes Then
ComPorts.Enabled = True
130

DataGrid1.Enabled = False
SetupBTN.Visible = False
SaveBTN.Visible = True
DeactivateBTN.Enabled = False
RoomSearch.Enabled = False
End If
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
Device.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
Device.RecordSource = "Select * from SetupDevice"
Set DataGrid1.DataSource = Device
With DataGrid1
.Columns(0).Width = "2700"
.Columns(1).Width = "1500"
.Columns(2).Width = "900"
.Columns(1).Alignment = dbgCenter
.Columns(2).Alignment = dbgCenter
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
.HeadFont.Size = "11"
.HeadFont.Italic = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
With Device
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
ComPorts.Text = .Recordset.Fields("COMPORT")
DeviceStatus.Text = .Recordset.Fields("STATUS")
End With
End Sub

Private Sub Form_Unload(Cancel As Integer)


Unload DeviceList
End Sub

Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
Dim lngReturnValue As Long
If Button = 1 Then
Call ReleaseCapture
lngReturnValue = SendMessage(SetupDevice.hWnd, WM_NCLBUTTONDOWN,
HTCAPTION, 0&)
End If
End Sub

Private Sub RoomSearch_Change()


131

Call setrecord(Me.Device, "select * from SetupDevice where ROOMS like'" &


Me.RoomSearch.Text & "%" & "'")
If Device.Recordset.EOF = True And Device.Recordset.BOF = True Then
ROOMLABEL.Caption = ""
ComPorts.Text = "0"
DeviceStatus.Text = ""
Else
ROOMLABEL.Caption = Device.Recordset.Fields("ROOMS")
ComPorts.Text = Device.Recordset.Fields("COMPORT")
DeviceStatus.Text = Device.Recordset.Fields("STATUS")
End If
End Sub

Private Sub SaveBTN_Click()


Dim savedata As Integer
savedata = MsgBox("Do you want to save?", vbInformation + vbYesNo, "SETUP
DEVICE")
If savedata = vbYes Then
With Device
.Recordset.Fields("COMPORT") = ComPorts.Text
.Recordset.Fields("STATUS") = "ACTIVATED"
.Recordset.Update
SaveBTN.Visible = False
DataGrid1.Enabled = True
ComPorts.Enabled = False
RoomSearch.Enabled = True
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
ComPorts.Text = .Recordset.Fields("COMPORT")
DeviceStatus.Text = .Recordset.Fields("STATUS")
End With
GoTo REFRESHSTATUS1
End If
REFRESHSTATUS1:

If DeviceStatus.Text = "ACTIVATED" Then


SetupBTN.Visible = False
EditBTN.Visible = True
DeactivateBTN.Enabled = True
End If
If DeviceStatus.Text = "DEACTIVATED" Then
SetupBTN.Visible = True
EditBTN.Visible = False
DeactivateBTN.Enabled = False
End If
End Sub

Private Sub SetupBTN_Click()


Dim newsetupbtn As Integer
newsetupbtn = MsgBox("Do you want to setup this connection?", vbInformation +
vbYesNo, "SETUP DEVICE")
If newsetupbtn = vbYes Then
132

ComPorts.Enabled = True
RoomSearch.Enabled = False
DataGrid1.Enabled = False
SetupBTN.Visible = False
SaveBTN.Visible = True
DeactivateBTN.Enabled = False
End If
End Sub
Private Sub CloseBTN_Click()
Unload Me
MainMenu.Show
End Sub

Private Sub DataGrid1_Click()


With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")
O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub DataGrid1_KeyDown(KeyCode As Integer, Shift As Integer)


With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")
O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub DataGrid1_KeyUp(KeyCode As Integer, Shift As Integer)


With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
133

O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")


O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub DataGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y


As Single)
With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")
O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)


With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")
O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub EditDelayBTN_Click()


EditDelayBTN.Visible = False
DataGrid1.Enabled = False
O1DList.Enabled = True
O2DList.Enabled = True
O3DList.Enabled = True
O4DList.Enabled = True
O1OFF.Enabled = True
134

O2OFF.Enabled = True
O3OFF.Enabled = True
O4OFF.Enabled = True
SaveBTN.Visible = True
SaveBTN.Caption = "Apply Changes"
End Sub

Private Sub Form_Activate()


O1Format.Caption = ""
O2Format.Caption = ""
O3Format.Caption = ""
O4Format.Caption = ""
O1Format2.Caption = ""
O2Format2.Caption = ""
O3Format2.Caption = ""
O4Format2.Caption = ""
With OutputsDelay
ROOMLABEL.Caption = .Recordset.Fields("ROOMS")
O1Label.Caption = .Recordset.Fields("OUTPUT 1 LABEL")
O2Label.Caption = .Recordset.Fields("OUTPUT 2 LABEL")
O3Label.Caption = .Recordset.Fields("OUTPUT 3 LABEL")
O4Label.Caption = .Recordset.Fields("OUTPUT 4 LABEL")
O1DList.Text = .Recordset.Fields("OUTPUT1")
O2DList.Text = .Recordset.Fields("OUTPUT2")
O3DList.Text = .Recordset.Fields("OUTPUT3")
O4DList.Text = .Recordset.Fields("OUTPUT4")
RoomStatus.Text = .Recordset.Fields("STATUS")
End With
Refresher.Value = True
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
OutputsDelay.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
OutputsDelay.RecordSource = "Select * from SetupOutputsDelay"
Set DataGrid1.DataSource = OutputsDelay
With DataGrid1
.Columns(0).Width = "2700"
.Columns(1).Width = "1200"
.Columns(2).Width = "1200"
.Columns(3).Width = "1200"
.Columns(4).Width = "1200"
.Columns(1).Alignment = dbgCenter
.Columns(2).Alignment = dbgCenter
.Columns(3).Alignment = dbgCenter
.Columns(4).Alignment = dbgCenter
.Font = "Arial Rounded MT Bold"
.Font.Size = "10"
.HeadLines = "2"
.HeadFont = "Bell MT"
135

.HeadFont.Size = "11"
.HeadFont.Italic = True
.MarqueeStyle = dbgHighlightRowRaiseCell
End With
End Sub

Private Sub O1DList_Change()


If O1DList.Text = "0" Then
O1Format.Caption = "Delay Off"
O1Format2.Caption = ""
O1OFF.Visible = False
End If
If O1DList.Text = "1" Then
O1Format.Caption = "MINUTE"
O1Format2.Caption = ""
End If
If O1DList.Text > 1 And O1DList.Text < 59 Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = ""
End If
If O1DList.Text = "60" Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = "/1 Hour"
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
End Sub

Private Sub O1DList_Click()


If O1DList.Text = "0" Then
O1Format.Caption = "Delay Off"
O1Format2.Caption = ""
O1OFF.Visible = False
End If
If O1DList.Text = "1" Then
O1Format.Caption = "MINUTE"
O1Format2.Caption = ""
End If
If O1DList.Text > 1 And O1DList.Text < 59 Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = ""
End If
If O1DList.Text = "60" Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = "/1 Hour"
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
End Sub
136

Private Sub O1DList_KeyDown(KeyCode As Integer, Shift As Integer)


If O1DList.Text = "0" Then
O1Format.Caption = "Delay Off"
O1Format2.Caption = ""
O1OFF.Visible = False
End If
If O1DList.Text = "1" Then
O1Format.Caption = "MINUTE"
O1Format2.Caption = ""
End If
If O1DList.Text > 1 And O1DList.Text < 59 Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = ""
End If
If O1DList.Text = "60" Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = "/1 Hour"
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
End Sub

Private Sub O1DList_KeyPress(KeyAscii As Integer)


If O1DList.Text = "0" Then
O1Format.Caption = "Delay Off"
O1Format2.Caption = ""
O1OFF.Visible = False
End If
If O1DList.Text = "1" Then
O1Format.Caption = "MINUTE"
O1Format2.Caption = ""
End If
If O1DList.Text > 1 And O1DList.Text < 59 Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = ""
End If
If O1DList.Text = "60" Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = "/1 Hour"
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
End Sub

Private Sub O1DList_KeyUp(KeyCode As Integer, Shift As Integer)


If O1DList.Text = "0" Then
O1Format.Caption = "Delay Off"
O1Format2.Caption = ""
137

O1OFF.Visible = False
End If
If O1DList.Text = "1" Then
O1Format.Caption = "MINUTE"
O1Format2.Caption = ""
End If
If O1DList.Text > 1 And O1DList.Text < 59 Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = ""
End If
If O1DList.Text = "60" Then
O1Format.Caption = "MINUTES"
O1Format2.Caption = "/1 Hour"
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
End Sub

Private Sub O1OFF_Click()


O1DList.Text = "0"
O1OFF.Visible = False
End Sub

Private Sub O2DList_Change()


If O2DList.Text = "0" Then
O2Format.Caption = "Delay Off"
O2Format2.Caption = ""
O2OFF.Visible = False
End If
If O2DList.Text = "1" Then
O2Format.Caption = "MINUTE"
O2Format2.Caption = ""
End If
If O2DList.Text > 1 And O2DList.Text < 59 Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = ""
End If
If O2DList.Text = "60" Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = "/1 Hour"
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
End Sub

Private Sub O2DList_Click()


If O2DList.Text = "0" Then
O2Format.Caption = "Delay Off"
O2Format2.Caption = ""
138

O2OFF.Visible = False
End If
If O2DList.Text = "1" Then
O2Format.Caption = "MINUTE"
O2Format2.Caption = ""
End If
If O2DList.Text > 1 And O2DList.Text < 59 Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = ""
End If
If O2DList.Text = "60" Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = "/1 Hour"
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
End Sub

Private Sub O2DList_KeyDown(KeyCode As Integer, Shift As Integer)


If O2DList.Text = "0" Then
O2Format.Caption = "Delay Off"
O2Format2.Caption = ""
O2OFF.Visible = False
End If
If O2DList.Text = "1" Then
O2Format.Caption = "MINUTE"
O2Format2.Caption = ""
End If
If O2DList.Text > 1 And O2DList.Text < 59 Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = ""
End If
If O2DList.Text = "60" Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = "/1 Hour"
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
End Sub

Private Sub O2DList_KeyPress(KeyAscii As Integer)


If O2DList.Text = "0" Then
O2Format.Caption = "Delay Off"
O2Format2.Caption = ""
O2OFF.Visible = False
End If
If O2DList.Text = "1" Then
O2Format.Caption = "MINUTE"
O2Format2.Caption = ""
139

End If
If O2DList.Text > 1 And O2DList.Text < 59 Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = ""
End If
If O2DList.Text = "60" Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = "/1 Hour"
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
End Sub

Private Sub O2DList_KeyUp(KeyCode As Integer, Shift As Integer)


If O2DList.Text = "0" Then
O2Format.Caption = "Delay Off"
O2Format2.Caption = ""
O2OFF.Visible = False
End If
If O2DList.Text = "1" Then
O2Format.Caption = "MINUTE"
O2Format2.Caption = ""
End If
If O2DList.Text > 1 And O2DList.Text < 59 Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = ""
End If
If O2DList.Text = "60" Then
O2Format.Caption = "MINUTES"
O2Format2.Caption = "/1 Hour"
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
End Sub

Private Sub O2OFF_Click()


O2DList.Text = "0"
O2OFF.Visible = False
End Sub

Private Sub O3DList_Change()


If O3DList.Text = "0" Then
O3Format.Caption = "Delay Off"
O3Format2.Caption = ""
O3OFF.Visible = False
End If
If O3DList.Text = "1" Then
O3Format.Caption = "MINUTE"
O3Format2.Caption = ""
140

End If
If O3DList.Text > 1 And O3DList.Text < 59 Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = ""
End If
If O3DList.Text = "60" Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = "/1 Hour"
End If
If O3DList.Text > 0 Then
O3OFF.Visible = True
End If
End Sub

Private Sub O3DList_Click()


If O3DList.Text = "0" Then
O3Format.Caption = "Delay Off"
O3Format2.Caption = ""
O3OFF.Visible = False
End If
If O3DList.Text = "1" Then
O3Format.Caption = "MINUTE"
O3Format2.Caption = ""
End If
If O3DList.Text > 1 And O3DList.Text < 59 Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = ""
End If
If O3DList.Text = "60" Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = "/1 Hour"
End If
If O3DList.Text > 0 Then
O3OFF.Visible = True
End If
End Sub

Private Sub O3DList_KeyDown(KeyCode As Integer, Shift As Integer)


If O3DList.Text = "0" Then
O3Format.Caption = "Delay Off"
O3Format2.Caption = ""
O3OFF.Visible = False
End If
If O3DList.Text = "1" Then
O3Format.Caption = "MINUTE"
O3Format2.Caption = ""
End If
If O3DList.Text > 1 And O3DList.Text < 59 Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = ""
End If
141

If O3DList.Text = "60" Then


O3Format.Caption = "MINUTES"
O3Format2.Caption = "/1 Hour"
End If
If O3DList.Text > 0 Then
O3OFF.Visible = True
End If
End Sub

Private Sub O3DList_KeyPress(KeyAscii As Integer)


If O3DList.Text = "0" Then
O3Format.Caption = "Delay Off"
O3Format2.Caption = ""
O3OFF.Visible = False
End If
If O3DList.Text = "1" Then
O3Format.Caption = "MINUTE"
O3Format2.Caption = ""
End If
If O3DList.Text > 1 And O3DList.Text < 59 Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = ""
End If
If O3DList.Text = "60" Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = "/1 Hour"
End If
If O3DList.Text > 0 Then
O3OFF.Visible = True
End If
End Sub

Private Sub O3DList_KeyUp(KeyCode As Integer, Shift As Integer)


If O3DList.Text = "0" Then
O3Format.Caption = "Delay Off"
O3Format2.Caption = ""
O3OFF.Visible = False
End If
If O3DList.Text = "1" Then
O3Format.Caption = "MINUTE"
O3Format2.Caption = ""
End If
If O3DList.Text > 1 And O3DList.Text < 59 Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = ""
End If
If O3DList.Text = "60" Then
O3Format.Caption = "MINUTES"
O3Format2.Caption = "/1 Hour"
End If
If O3DList.Text > 0 Then
142

O3OFF.Visible = True
End If
End Sub

Private Sub O3OFF_Click()


O3DList.Text = "0"
O3OFF.Visible = False
End Sub

Private Sub O4DList_Change()


If O4DList.Text = "0" Then
O4Format.Caption = "Delay Off"
O4Format2.Caption = ""
O4OFF.Visible = False
End If
If O4DList.Text = "1" Then
O4Format.Caption = "MINUTE"
O4Format2.Caption = ""
End If
If O4DList.Text > 1 And O4DList.Text < 59 Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = ""
End If
If O4DList.Text = "60" Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = "/1 Hour"
End If
If O4DList.Text > 0 Then
O4OFF.Visible = True
End If
End Sub

Private Sub O4DList_Click()


If O4DList.Text = "0" Then
O4Format.Caption = "Delay Off"
O4Format2.Caption = ""
O4OFF.Visible = False
End If
If O4DList.Text = "1" Then
O4Format.Caption = "MINUTE"
O4Format2.Caption = ""
End If
If O4DList.Text > 1 And O4DList.Text < 59 Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = ""
End If
If O4DList.Text = "60" Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = "/1 Hour"
End If
If O4DList.Text > 0 Then
143

O4OFF.Visible = True
End If
End Sub

Private Sub O4DList_KeyDown(KeyCode As Integer, Shift As Integer)


If O4DList.Text = "0" Then
O4Format.Caption = "Delay Off"
O4Format2.Caption = ""
O4OFF.Visible = False
End If
If O4DList.Text = "1" Then
O4Format.Caption = "MINUTE"
O4Format2.Caption = ""
End If
If O4DList.Text > 1 And O4DList.Text < 59 Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = ""
End If
If O4DList.Text = "60" Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = "/1 Hour"
End If
If O4DList.Text > 0 Then
O4OFF.Visible = True
End If
End Sub

Private Sub O4DList_KeyPress(KeyAscii As Integer)


If O4DList.Text = "0" Then
O4Format.Caption = "Delay Off"
O4Format2.Caption = ""
O4OFF.Visible = False
End If
If O4DList.Text = "1" Then
O4Format.Caption = "MINUTE"
O4Format2.Caption = ""
End If
If O4DList.Text > 1 And O4DList.Text < 59 Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = ""
End If
If O4DList.Text = "60" Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = "/1 Hour"
End If
If O4DList.Text > 0 Then
O4OFF.Visible = True
End If
End Sub

Private Sub O4DList_KeyUp(KeyCode As Integer, Shift As Integer)


144

If O4DList.Text = "0" Then


O4Format.Caption = "Delay Off"
O4Format2.Caption = ""
O4OFF.Visible = False
End If
If O4DList.Text = "1" Then
O4Format.Caption = "MINUTE"
O4Format2.Caption = ""
End If
If O4DList.Text > 1 And O4DList.Text < 59 Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = ""
End If
If O4DList.Text = "60" Then
O4Format.Caption = "MINUTES"
O4Format2.Caption = "/1 Hour"
End If
If O4DList.Text > 0 Then
O4OFF.Visible = True
End If
End Sub

Private Sub O4OFF_Click()


O4DList.Text = "0"
O4OFF.Visible = False
End Sub

Private Sub Refresher_Click()


If O1DList.Text = "0" And O2DList.Text = "0" And O3DList.Text = "0" And O4DList.Text =
"0" Then
SetDelayBTN.Visible = True
EditDelayBTN.Visible = False
O1OFF.Visible = False
O2OFF.Visible = False
O3OFF.Visible = False
O4OFF.Visible = False
End If
If O1DList.Text > 0 Or O2DList.Text > 0 Or O3DList.Text > 0 Or O4DList.Text > 0 Then
EditDelayBTN.Visible = True
SetDelayBTN.Visible = False
End If
If O1DList.Text > 0 Then
O1OFF.Visible = True
End If
If O2DList.Text > 0 Then
O2OFF.Visible = True
End If
If O3DList.Text > 0 Then
O3OFF.Visible = True
End If
If O4DList.Text > 0 Then
145

O4OFF.Visible = True
End If
End Sub

Private Sub RoomStatus_Change()


If RoomStatus.Text = "DEACTIVATED" Then
SetDelayBTN.Enabled = False
End If
If RoomStatus.Text = "ACTIVATED" Then
SetDelayBTN.Enabled = True
End If
End Sub

Private Sub SaveBTN_Click()


With OutputsDelay
.Recordset.Fields("OUTPUT1") = O1DList.Text
.Recordset.Fields("OUTPUT2") = O2DList.Text
.Recordset.Fields("OUTPUT3") = O3DList.Text
.Recordset.Fields("OUTPUT4") = O4DList.Text
.Recordset.Update
End With
DataGrid1.Enabled = True
O1DList.Enabled = False
O2DList.Enabled = False
O3DList.Enabled = False
O4DList.Enabled = False
SaveBTN.Visible = False
SaveBTN.Caption = ""
Refresher.Value = True
O1OFF.Enabled = False
O2OFF.Enabled = False
O3OFF.Enabled = False
O4OFF.Enabled = False
End Sub

Private Sub SetDelayBTN_Click()


SetDelayBTN.Visible = False
DataGrid1.Enabled = False
O1DList.Enabled = True
O2DList.Enabled = True
O3DList.Enabled = True
O4DList.Enabled = True
SaveBTN.Visible = True
SaveBTN.Caption = "Apply"
O1OFF.Enabled = True
O2OFF.Enabled = True
O3OFF.Enabled = True
O4OFF.Enabled = True
End Sub

Private Sub ApplyBTN_Click()


146

If SchedulingStatus.Text = "ACTIVATED" Then


If Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 0 And Check4.Value =
0 And Check5.Value = 0 And Check6.Value = 0 And Check7.Value = 0 Then
MsgBox "Please choose what day of scheduling to be activate.", vbCritical,
"APPLIANCE WIRING CONTROL SYSTEM"
ElseIf TimeON.Text = "MANUAL" And TimeOFF.Text = "MANUAL" Then
MsgBox "(TIME ON) and (TIME OFF) is set to MANUAL, please set atleast one of the
command to SCHEDULE.", vbCritical, "APPLIANCE WIRING CONTROL SYSTEM"
ElseIf TimeON.Text <> MANUAL And ONHOURS.Text < 0 And ONHOURS.Text > 12
Then
MsgBox "Please select schedule hour/s when the power will on", vbCritical,
"APPLIANCE WIRING CONTROL SYSTEM"
ElseIf TimeON.Text <> MANUAL And ONMINUTES.Text < 0 And ONMINUTES.Text >
60 Then
MsgBox "lease select schedule minute/s when the power will on", vbCritical,
"APPLIANCE WIRING CONTROL SYSTEM"
ElseIf TimeOFF.Text <> MANUAL And OFFHOURS.Text < 0 And OFFHOURS.Text >
12 Then
MsgBox "Please select schedule hour/s when the power will off", vbCritical,
"APPLIANCE WIRING CONTROL SYSTEM"
ElseIf TimeOFF.Text <> MANUAL And OFFMINUTES.Text < 0 And OFFMINUTES.Text
> 60 Then
MsgBox "lease select schedule minute/s when the power will off", vbCritical,
"APPLIANCE WIRING CONTROL SYSTEM"
Else
With RoomDB
.Recordset.Fields("SWITCHSCHEDULE") = SchedulingStatus.Text
If Check1.Value = 1 Then
.Recordset.Fields("MONDAY") = "TRUE"
End If
If Check1.Value = 0 Then
.Recordset.Fields("MONDAY") = "FALSE"
End If
If Check2.Value = 1 Then
.Recordset.Fields("TUESDAY") = "TRUE"
End If
If Check2.Value = 0 Then
.Recordset.Fields("TUESDAY") = "FALSE"
End If
If Check3.Value = 1 Then
.Recordset.Fields("WEDNESDAY") = "TRUE"
End If
If Check3.Value = 0 Then
.Recordset.Fields("WEDNESDAY") = "FALSE"
End If
If Check4.Value = 1 Then
.Recordset.Fields("THURSDAY") = "TRUE"
End If
If Check4.Value = 0 Then
.Recordset.Fields("THURSDAY") = "FALSE"
End If
147

If Check5.Value = 1 Then
.Recordset.Fields("FRIDAY") = "TRUE"
End If
If Check5.Value = 0 Then
.Recordset.Fields("FRIDAY") = "FALSE"
End If
If Check6.Value = 1 Then
.Recordset.Fields("SATURDAY") = "TRUE"
End If
If Check6.Value = 0 Then
.Recordset.Fields("SATURDAY") = "FALSE"
End If
If Check7.Value = 1 Then
.Recordset.Fields("SUNDAY") = "TRUE"
End If
If Check7.Value = 0 Then
.Recordset.Fields("SUNDAY") = "FALSE"
End If
.Recordset.Fields("TIME ON") = TimeON.Text
.Recordset.Fields("TIME OFF") = TimeOFF.Text
.Recordset.Fields("ONHOURS") = ONHOURS.Text
.Recordset.Fields("ONMINUTES") = ONMINUTES.Text
.Recordset.Fields("ONAMPM") = ONAMPM.Text
.Recordset.Fields("OFFHOURS") = OFFHOURS.Text
.Recordset.Fields("OFFMINUTES") = OFFMINUTES.Text
.Recordset.Fields("OFFAMPM") = OFFAMPM.Text
.Recordset.Update
End With
MsgBox "Scheduling Activated!.", vbInformation, "APPLIANCE WIRING CONTROL
SYSTEM"
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
SchedulingStatus.Enabled = False
ApplyBTN.Visible = False
ROOMBTN.Visible = True
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
Combo1.Enabled = True
148

SchedulingCommands.SchedTimer.Value = True
GoTo NEWLOAD
End If
End If
If SchedulingStatus.Text = "DEACTIVATED" Then
With RoomDB
.Recordset.Fields("SWITCHSCHEDULE") = SchedulingStatus.Text
.Recordset.Fields("TIME ON") = "MANUAL"
.Recordset.Fields("TIME OFF") = "MANUAL"
.Recordset.Fields("ONHOURS") = "1"
.Recordset.Fields("ONMINUTES") = "00"
.Recordset.Fields("ONAMPM") = "AM"
.Recordset.Fields("OFFHOURS") = "1"
.Recordset.Fields("OFFMINUTES") = "00"
.Recordset.Fields("OFFAMPM") = "AM"
.Recordset.Fields("MONDAY") = "FALSE"
.Recordset.Fields("TUESDAY") = "FALSE"
.Recordset.Fields("WEDNESDAY") = "FALSE"
.Recordset.Fields("THURSDAY") = "FALSE"
.Recordset.Fields("FRIDAY") = "FALSE"
.Recordset.Fields("SATURDAY") = "FALSE"
.Recordset.Fields("SUNDAY") = "FALSE"
.Recordset.Update
End With
MsgBox "Scheduling Deactivated!.", vbInformation, "APPLIANCE WIRING CONTROL
SYSTEM"
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
SchedulingStatus.Enabled = False
ApplyBTN.Visible = False
ROOMBTN.Visible = True
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
SchedulingCommands.SchedTimer.Value = True
Combo1.Enabled = True
GoTo NEWLOAD
End If
Exit Sub
149

NEWLOAD:
If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
150

SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
151

FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
152

TimeON.Text = RoomDB.Recordset.Fields("TIME ON")


TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
153

Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
154

Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End If
End Sub

Private Sub Check1_Click()


If Check1.Value = 1 Then
MondayTxt.Text = "TRUE"
End If
If Check1.Value = 0 Then
MondayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check2_Click()


If Check2.Value = 1 Then
TuesdayTxt.Text = "TRUE"
End If
If Check2.Value = 0 Then
TuesdayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check3_Click()


If Check3.Value = 1 Then
WednesdayTxt.Text = "TRUE"
155

End If
If Check3.Value = 0 Then
WednesdayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check4_Click()


If Check4.Value = 1 Then
ThursdayTxt.Text = "TRUE"
End If
If Check4.Value = 0 Then
ThursdayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check5_Click()


If Check5.Value = 1 Then
FridayTxt.Text = "TRUE"
End If
If Check5.Value = 0 Then
FridayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check6_Click()


If Check6.Value = 1 Then
SaturdayTxt.Text = "TRUE"
End If
If Check6.Value = 0 Then
SaturdayTxt.Text = "FALSE"
End If
End Sub

Private Sub Check7_Click()


If Check7.Value = 1 Then
SundayTxt.Text = "TRUE"
End If
If Check7.Value = 0 Then
SundayTxt.Text = "FALSE"
End If
End Sub

Private Sub CloseBTN_Click()


SchedulingCommands.SchedTimer.Value = True
MainMenu.Show
Unload Me
End Sub

Private Sub Combo1_Change()


If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
156

RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
157

ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
158

TimeON.Text = RoomDB.Recordset.Fields("TIME ON")


TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
159

ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
End If
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
160

Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End Sub

Private Sub Combo1_Click()


If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
161

ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
162

TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")


GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
163

SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
164

ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
End If
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
165

If FridayTxt.Text = "TRUE" Then


Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End Sub

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)


If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
166

ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
167

TimeON.Text = RoomDB.Recordset.Fields("TIME ON")


TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
168

OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
169

TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")


GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
End If
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
170

End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)


If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
171

TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")


GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
172

SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
173

ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
End If
If MondayTxt.Text = "TRUE" Then
174

Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
If WednesdayTxt.Text = "FALSE" Then
Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End Sub

Private Sub Combo1_KeyUp(KeyCode As Integer, Shift As Integer)


If Combo1.Text = "ROOM 101" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "101" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
175

ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 102" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "102" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 103" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "103" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
176

TimeON.Text = RoomDB.Recordset.Fields("TIME ON")


TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 104" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "104" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "ROOM 105" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "105" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
177

OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F COMFORT ROOM" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F CR" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
ElseIf Combo1.Text = "1F HALLWAY" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "1F HALLWAY" +
"'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
178

TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")


GoSub SubDATA
ElseIf Combo1.Text = "CLINIC" Then
RoomDB.RecordSource = "Select * from Config where ROOMS='" + "CLINIC" + "'"
RoomDB.Refresh
SchedulingStatus.Text = RoomDB.Recordset.Fields("SwitchSchedule")
MondayTxt.Text = RoomDB.Recordset.Fields("MONDAY")
TuesdayTxt.Text = RoomDB.Recordset.Fields("TUESDAY")
WednesdayTxt.Text = RoomDB.Recordset.Fields("WEDNESDAY")
ThursdayTxt.Text = RoomDB.Recordset.Fields("THURSDAY")
FridayTxt.Text = RoomDB.Recordset.Fields("FRIDAY")
SaturdayTxt.Text = RoomDB.Recordset.Fields("SATURDAY")
SundayTxt.Text = RoomDB.Recordset.Fields("SUNDAY")
StatusTxt.Text = RoomDB.Recordset.Fields("STATUS")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
ONHOURS.Text = RoomDB.Recordset.Fields("ONHOURS")
ONMINUTES.Text = RoomDB.Recordset.Fields("ONMINUTES")
ONAMPM.Text = RoomDB.Recordset.Fields("ONAMPM")
OFFHOURS.Text = RoomDB.Recordset.Fields("OFFHOURS")
OFFMINUTES.Text = RoomDB.Recordset.Fields("OFFMINUTES")
OFFAMPM.Text = RoomDB.Recordset.Fields("OFFAMPM")
TimeON.Text = RoomDB.Recordset.Fields("TIME ON")
TimeOFF.Text = RoomDB.Recordset.Fields("TIME OFF")
GoSub SubDATA
End If
Exit Sub

SubDATA:
ROOMLABEL.Caption = Combo1.Text
If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
End If
If MondayTxt.Text = "TRUE" Then
Check1.Value = 1
End If
If MondayTxt.Text = "FALSE" Then
Check1.Value = 0
End If
If TuesdayTxt.Text = "TRUE" Then
Check2.Value = 1
End If
If TuesdayTxt.Text = "FALSE" Then
Check2.Value = 0
End If
If WednesdayTxt.Text = "TRUE" Then
Check3.Value = 1
End If
179

If WednesdayTxt.Text = "FALSE" Then


Check3.Value = 0
End If
If ThursdayTxt.Text = "TRUE" Then
Check4.Value = 1
End If
If ThursdayTxt.Text = "FALSE" Then
Check4.Value = 0
End If
If FridayTxt.Text = "TRUE" Then
Check5.Value = 1
End If
If FridayTxt.Text = "FALSE" Then
Check5.Value = 0
End If
If SaturdayTxt.Text = "TRUE" Then
Check6.Value = 1
End If
If SaturdayTxt.Text = "FALSE" Then
Check6.Value = 0
End If
If SundayTxt.Text = "TRUE" Then
Check7.Value = 1
End If
If SundayTxt.Text = "FALSE" Then
Check7.Value = 0
End If
End Sub

Private Sub Form_Load()


Skin1.ApplySkin Me.hWnd
RoomDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Database\Configuration.mdb;User Id=admin;Password=;"
End Sub

Private Sub ROOMBTN_Click()


If Combo1.Text = "" Then
Else
ROOMBTN.Visible = False
ApplyBTN.Visible = True
SchedulingStatus.Enabled = True
Combo1.Enabled = False
SchedulingStatus_Click
If TimeOFF.Text = "MANUAL" Then
TimeOFFMANUAL_Click
Else
TimeOFFSCHED_Click
TimeOFFHOURS.Text = OFFHOURS.Text
TimeOFFMINUTES.Text = OFFMINUTES.Text
TimeOFFAMPM.Text = OFFAMPM.Text
End If
180

If TimeON.Text = "MANUAL" Then


TimeONMANUAL_Click
Else
TimeONSCHED_Click
TimeONHOURS.Text = ONHOURS.Text
TimeONMINUTES.Text = ONMINUTES.Text
TimeONAMPM.Text = ONAMPM.Text
End If
End If
End Sub

Private Sub SchedulingStatus_Change()


If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True
Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
181

TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
End If
End If
End Sub

Private Sub SchedulingStatus_Click()


If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True
Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
182

TimeOFFAMPM.Enabled = True
End If
End If
End Sub

Private Sub SchedulingStatus_GotFocus()


If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True
Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
End If
End If
183

End Sub

Private Sub SchedulingStatus_KeyDown(KeyCode As Integer, Shift As Integer)


If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True
Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
End If
End If
End Sub

Private Sub SchedulingStatus_KeyPress(KeyAscii As Integer)


184

If SchedulingStatus.Text = "DEACTIVATED" Then


ROOMBTN.Caption = "SET SCHEDULE"
If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True
Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
End If
End If
End Sub

Private Sub SchedulingStatus_KeyUp(KeyCode As Integer, Shift As Integer)


If SchedulingStatus.Text = "DEACTIVATED" Then
ROOMBTN.Caption = "SET SCHEDULE"
185

If SchedulingStatus.Text = "DEACTIVATED" And SchedulingStatus.Enabled = True


Then
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Check7.Enabled = False
TimeONSCHED.Enabled = False
TimeONMANUAL.Enabled = False
TimeOFFSCHED.Enabled = False
TimeOFFMANUAL.Enabled = False
TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
End If
End If
If SchedulingStatus.Text = "ACTIVATED" Then
ROOMBTN.Caption = "EDIT SCHEDULE"
If SchedulingStatus.Text = "ACTIVATED" And SchedulingStatus.Enabled = True Then
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Check7.Enabled = True
TimeONSCHED.Enabled = True
TimeONMANUAL.Enabled = True
TimeOFFSCHED.Enabled = True
TimeOFFMANUAL.Enabled = True
TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
End If
End If
End Sub

Private Sub StatusTxt_Change()


If StatusTxt.Text = "ACTIVATED" Then
ROOMBTN.Enabled = True
End If
If StatusTxt.Text = "DEACTIVATED" Then
ROOMBTN.Enabled = False
186

End If
End Sub

Private Sub TimeOFF_Change()


If TimeOFF.Text = "MANUAL" Then
TimeOFFMANUAL.Value = True
End If
End Sub

Private Sub TimeOFFAMPM_Click()


TimeOFF.Text = ""
OFFAMPM.Text = TimeOFFAMPM.Text
TimeOFF.Text = TimeOFFHOURS.Text & ":" & TimeOFFMINUTES.Text & ":00 " &
TimeOFFAMPM.Text
End Sub

Private Sub TimeOFFHOURS_Click()


TimeOFF.Text = ""
OFFHOURS.Text = TimeOFFHOURS.Text
TimeOFF.Text = TimeOFFHOURS.Text & ":" & TimeOFFMINUTES.Text & ":00 " &
TimeOFFAMPM.Text
End Sub

Private Sub TimeOFFMANUAL_Click()


TimeOFFHOURS.Enabled = False
TimeOFFMINUTES.Enabled = False
TimeOFFAMPM.Enabled = False
TimeOFF.Text = "MANUAL"
TimeOFFMANUAL.BackColor = vbGreen
TimeOFFMANUAL.BackOver = vbGreen
TimeOFFSCHED.BackColor = vbWhite
TimeOFFSCHED.BackOver = vbWhite
End Sub
Private Sub TimeOFFMINUTES_Click()
TimeOFF.Text = ""
OFFMINUTES.Text = TimeOFFMINUTES.Text
TimeOFF.Text = TimeOFFHOURS.Text & ":" & TimeOFFMINUTES.Text & ":00 " &
TimeOFFAMPM.Text
End Sub

Private Sub TimeOFFSCHED_Click()


TimeOFFHOURS.Enabled = True
TimeOFFMINUTES.Enabled = True
TimeOFFAMPM.Enabled = True
TimeOFFMANUAL.BackColor = vbWhite
TimeOFFMANUAL.BackOver = vbWhite
TimeOFFSCHED.BackColor = vbGreen
TimeOFFSCHED.BackOver = vbGreen
TimeOFF.Text = TimeOFFHOURS.Text & ":" & TimeOFFMINUTES.Text & ":00 " &
TimeOFFAMPM.Text
TimeOFFHOURS.Text = OFFHOURS.Text
187

TimeOFFMINUTES.Text = OFFMINUTES.Text
TimeOFFAMPM.Text = OFFAMPM.Text
End Sub

Private Sub TimeON_Change()


If TimeON.Text = "MANUAL" Then
TimeONMANUAL.Value = True
End If
End Sub

Private Sub TimeONAMPM_Click()


TimeON.Text = ""
ONAMPM.Text = TimeONAMPM.Text
TimeON.Text = TimeONHOURS.Text & ":" & TimeONMINUTES.Text & ":00 " &
TimeONAMPM.Text
End Sub

Private Sub TimeONHOURS_Click()


TimeON.Text = ""
ONHOURS.Text = TimeONHOURS.Text
TimeON.Text = TimeONHOURS.Text & ":" & TimeONMINUTES.Text & ":00 " &
TimeONAMPM.Text
End Sub

Private Sub TimeONMANUAL_Click()


TimeONHOURS.Enabled = False
TimeONMINUTES.Enabled = False
TimeONAMPM.Enabled = False
TimeON.Text = "MANUAL"
TimeONMANUAL.BackColor = vbGreen
TimeONMANUAL.BackOver = vbGreen
TimeONSCHED.BackColor = vbWhite
TimeONSCHED.BackOver = vbWhite
End Sub

Private Sub TimeONMINUTES_Click()


TimeON.Text = ""
ONMINUTES.Text = TimeONMINUTES.Text
TimeON.Text = TimeONHOURS.Text & ":" & TimeONMINUTES.Text & ":00 " &
TimeONAMPM.Text
End Sub

Private Sub TimeONSCHED_Click()


TimeONHOURS.Enabled = True
TimeONMINUTES.Enabled = True
TimeONAMPM.Enabled = True
TimeONMANUAL.BackColor = vbWhite
TimeONMANUAL.BackOver = vbWhite
TimeONSCHED.BackColor = vbGreen
TimeONSCHED.BackOver = vbGreen
188

TimeON.Text = TimeONHOURS.Text & ":" & TimeONMINUTES.Text & ":00 " &
TimeONAMPM.Text
TimeONHOURS.Text = ONHOURS.Text
TimeONMINUTES.Text = ONMINUTES.Text
TimeONAMPM.Text = ONAMPM.Text
End Sub
189

Program Output

Figure 4

Login Form
190

Figure 5

On/Off Switch (Main Menu)

Figure 6

Rooms (First Floor)


191

Figure 7

Switch Scheduling (Main Menu)

Figure 8

Switch Buttons (Rooms)


192

Figure 9

On Off Log (Main Menu)

Figure 10

Admin Panel (Main Menu)


193

Figure 11

User’s Account

Figure 12

Output Delay Setup


194

Figure 13

Device Setup

Figure 14

Factory Data Reset


195

User’s Manual
Outline of the User’s Manual

Section 1

Introduction

Production Overview and Rational

System Requirements

A. Hardware Requirements

B. Software Requirements

Terminologies and Basic Features

Section 2

Getting Started

Section 3

Modes of Operation

Section 4

Advance Features

Section 5

Command Syntax and System Option

SECTION 1

Introduction

In the development of technology and continuous improvement of people’s

living standard, people are in pursuit of automated, intelligent and convenient

control systems. With the increase in consumption of energy and population,

there is a grave need to conserve energy in every way possible.


196

This Appliance Wiring Control System provides user’s manual that serves

as a guideline on how to use the system in a way that user can easily understand

the system.

Production Overview and Rational

The researchers developed the Appliance Wiring Control Systemaimed to

create a system where the students, faculty and staffs can ensure their safety in

using the Facilities of the University. Study is confined to develop a system that

automatically controls the electronic appliances. Through a help of the Arduino

uno board, the system and the data base that is made by the researchers, a

person who manage the maintenance of the university can easily control (on/off)

the working appliance or used.

The developed system runs in a typical desktop installed with Microsoft

Access 2007 version and Arduino drivers for the connection between the System

and the Hardware. Using the developed system accuracy, Applicability,

Workability, Efficiency and Reliability are highly obtained.

System Requirements

The following hardware and software are needed for the effective running

of the system.

Hardware Requirements

The hardware requirements of the Appliance Wiring Control System are at least; Dual-

core processor, 2GB RAM, 512MB of video card, 80GB hard disk, monitor (at least 1366 x

768 resolutions) and Arduino Uno board.


197

The hardware’s will serve as the foundation for the system to run. And will

be required to attain more workability of the system.

Software Requirements

For the Appliance Wiring Control system to work, the following software are needed;

Net framework 4.0 for Visual Basic 6.0, Arduino Software, MS Access, at least Windows XP

Operating System

MS Access is a relationship database management system for Microsoft

that combines the relational Microsoft Jet Database Engine with graphical user

interface, and software development tools.

Terminologies and Basic Features

Login – Allows the User to input username and password to access the

system

Main Menu – Contains the menu.

Logout – Allows to close the system and go back to login Screen.

Shutdown – Allow to terminate the system.

SECTION 2

Getting started

To operate the Appliance Wiring Control System, the end user must follow
these following procedures

1. On the pc, click the Appliance Wiring Control System.


2. Enter username and password then press enter on your keyboard or
click the log in button.
3. If the username and password is valid, the main menu of the system
will appear.
198

4. If the account type logged in is administrator, the user will see the
admin panel button in main menu of the system. And if it is standard
the user will see the on/off switch, switch scheduling and on/logs
button in main menu.
5. If the users want to add a user account, delete all on/off logs, setup
outputs delay, setup the connection between the system and the
hardware, and to factory data reset. The user must be a administrator
account type.
6. If the administrator users click the admin panel button on main menu
form, the user account, delete all on/off logs, setup outputs delay,
setup device connection and factory data reset button will appear.
7. If the administrator users click the users account button on admin
panel form. The user can add, edit and delete an account.
8. If the administrator users click the delete all on/off logs button on
admin panel form, confirmation message will appear if the user wants
to delete all on/off logs.
9. If the administrator users click the setup device connection button on
admin panel form. The user can setup the connection between the
system and the hardware.
10. If the administrator users click the awcs device manager button on
setup device connection form. The user will see the list of available
communication ports that can use for setup on connection.
11. If the administrator users click refresh port button, the list of the port
will automatically refresh.
12. If the administrator users click arduino com port identifier button on
awcs device manager form. The arduino com port identifier will appear
and the user will see the name of the microcontroller used in the
hardware and their exact communication port (com port).
13. If the administrator users click windows device manager button on
awcs device manager form, the windows device manager will appear.
If the user click the [+] button on the PORTS(COM & LPT) section it
199

will expand and the user will see the name of the microcontroller used
in the hardware and their exact communication port (com port).
14. If the administrator users click setup outputs delay button on admin
panel form, the user can put delay in the outputs.
15. If the administrator users click factory data reset button on admin panel
form, confirmation message will appear to start the reset.
16. If the administrator and standard users click the on/off switch button on
main menu form. the floors button will appear.
17. If the administrator and standard users click the switch button on on/off
switch form. The user can see rooms of the corresponding floor.
18. If the administrator and standard users click the room button on
corresponding floor form. The user can easily turn on or turn off the
power. If the administrator users put a delay on the outputs,
administrator and standard user will see the time of the delay in each
switch buttons.
19. If the administrator and standard users click the cancel timer button on
room form. The timer of the outputs delay will canceled.
20. If the administrator and standard users click the edit outputs label
button on room form. The user can easily change the outputs label in
each switch buttons.
21. If the administrator and standard users click the switch scheduling
button on main menu form, the user can setup a turn on and turn off
scheduling.
22. If the administrator and standard users click the on/off logs button on
main menu form, the user will see the switch operation logs.
23. If the administrator and standard users click the refresh logs button on
on/off logs form, the list of the operation logs will automatically refresh.
24. If the administrator and standard users click the sub menu button on
main menu form, sub menu will appear.
25. If the administrator and standard users click the power restore button
on sub menu form, the user can restore the power in state status.
200

26. If the administrator and standard users click the show/hide notification
bar button on sub menu form, the notification bar will show/hide.
27. If the administrator and standard users click the about awcs button on
sub menu form, the about awcs will appear.
28. If the administrator and standard users click the power restore button
on sub menu form, the user can restore the power in state status.
29. If the administrator and standard users click the log out button on sub
menu form, the log out form will appear and the confirmation message
will display.

SECTION 3

Mode of Operation

The user can operate the system through keyboard – used in the input

text, mouse – a pointing device used to click buttons to get access from the

interface in the program and Arduino Uno Board

SECTION 4

Advance Features

Appliance Wiring Control System has its own advance features and

characteristics. These are the following:

1. The system provides safety feature because it can monitor the current

state of the appliances.

2. The system provides Real Time Update because it is synchronously

commands the hardware to on or off the appliances.


201

3. The system provides user Friendly program interface where te user

can easily interact with the system.

SECTION 5

Command, Syntax and System Operation

Allow user to operate the system

Allow user to operate on indicate switching options.

Allow user to schedule switching on allocated time.

Allow user to see operation log.

Allow user to operate on User Account, Setup device,


Setup output details and Factory data reset

Allow user to see the facilities to be operated.

Allow user to see the date, time and the day

Allows user to see sub menu.

Allow user to edit the output labels.


202

Allow user to operate on the users account.

Allows user to setup the connection between the system


and the device.

Allow user to operate on different appliances on the


room.

Allows user to reset its data to its default configuration.

Allow user to refresh the logs for the updated results.

Allow user to add information on its account

Allow user to edit information on its account.

Allow user to delete information on its account.

Allows user to edit the connection between the system


and the device.

Allows user to deactivate the connection between the


system and the device.

Allow user to see AWCS device manager.

Allow user to operate Power Restore, Show Notification


Bar, About AWCS and to Logout the account.

Allow user to minimize, maximize and exit the program.


203

The Level of Acceptability of the Developed Appliance Wiring Control


System as evaluated by the four groups of respondents in terms of Accuracy,
Applicability, Workability, Efficiency and Reliability

Table 2
Computed mean on the acceptability of Developed Appliance Wiring Control
System In terms of Accuracy
ACCURACY Electrical Admin Electronics IT Overall
The developed system /
program…
Mean SD Mean SD Mean SD Mean SD Mean VI
1. produces accurate
results 4.71 0.47 5.00 0.00 4.50 0.52 4.70 0.48 4.68 HA

2. gives desired output 4.78 0.43 5.00 0.00 4.50 0.52 4.60 0.70 4.68 HA

3.Meets the users 4.57 0.51 5.00 0.00 4.30 0.48 4.50 0.53 4.50 HA
demand and needs

4.Provides a clear 4.71 0.47 5.00 0.00 4.50 0.66 4.90 0.51 4.65 HA
presentation

5.Providescomplete data. 4.78 0.43 4.67 0.58 4.60 0.51 4.66 0.31 4.75 HA

Average Mean 4.71 0.24 4.93 0.11 4.51 0.22 4.66 0.33 4.65 HA

The result states that item 5 “The developed system / program Provides

complete data.” got the first rank with a mean of 4.75 and a verbal interpretation

of “Highly Acceptable”. Second rank is the items 1 and 2 “The developed

system / program System produces accurate results” and “The developed

System / program gives desired output” with a mean of 4.68 and a verbal

interpretation of “Highly acceptable”. Third rank is “The developed system /

program Provides a clear presentation” with a mean of 4.65 and a verbal

interpretation of “Highly Acceptable”. While item 3 “The developed system /

program Meets the users demand and needs “got the last rank with a mean of

4.50 and a verbal interpretation of “Highly Acceptable”


204

In terms of the Respondents "Admin" with an overall mean of 4.71 and a

verbal interpretation of "highly acceptable" is on the First rank. Second rank is

the "Electrical Experts" with an overall mean of 4.71 and a verbal interpretation of

"Highly Acceptable". followed by "IT experts" with an overall mean of 4.66 and a

verbal interpretation of "Highly Acceptable" and Lastly the "Electronics Experts"

with an overall mean of 4.51 and a verbal interpretation of "Highly Acceptable"

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the average mean of 4.65

in terms of accuracy.

Therefore the developed system produced correct and accurate data that meets
the demands of the respective end users.
Table 3
Computed mean on the acceptability of the Developed Appliance Wiring Control
System in terms of Applicability
Applicability Electrical Admin Electronics IT Overall
The developed system /
program...
Mean SD Mean SD Mean SD Mean SD Mean VI

1. executes accordingly 4.71 0.47 4.67 0.58 4.69 0.48 4.80 0.42 4.73 HA

2. have appropriate 4.57 0.51 5.00 0.00 4.77 0.44 4.90 0.37 4.75 HA
menus
3. provides accurate and
precise information that 4.50 0.51 5.00 0.00 4.77 0.44 4.90 0.37 4.75 HA
satisfies the needs of the
user

4. is well design for the 4.79 0.43 5.00 0.00 4.92 0.28 4.70 0.48 4.82 HA
user

5. is easy to use 4.50 0.52 5.00 0.00 4.69 0.48 4.30 0.82 4.55 HA

Average Mean 4.61 0.28 4.93 0.11 4.71 0.31 4.66 0.39 4.68 HA
205

It can be gleaned on the table 3 that item 4 “The developed system /

program are well design for the user”. Rank first with a overall mean of 4.83 and

a verbal interpretation of “Highly Acceptable”. Second rank is item 2 “The

developed system / program have appropriate menus” with an overall mean of

4.75 and a verbal interpretation of “Highly Acceptable”. Third rank is item 1 “The

developed system / program executes accordingly” with a overall mean of 4.73

and a verbal interpretation of “Highly Acceptable” while Items 3 and 5 “The

developed system / program provides accurate and precise information that

satisfies the needs of the user” and “The developed system / program are easy

to use” is in the last rank with a overall mean of 4.55 and a verbal interpretation

of “Highly Acceptable”

In terms of the Respondents "Admin" with an overall mean of 4.93 and a

verbal interpretation of "highly Acceptable" is on the First rank. Second rank is

the "Electronics Experts" with an overall mean of 4.71 and a verbal interpretation

of "Highly Acceptable". Followed by "IT experts" with an overall mean of 4.66 and

a verbal interpretation of "Highly Acceptable" and Lastly the "Electrical Experts"

with an overall mean of 4.61 and a verbal interpretation of "Highly Acceptable"

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the overall mean of 4.68

in terms of applicability.
206

Table 4
Computed mean on the acceptability of the Developed Appliance Wiring Control
System In terms of Workability
Electrical Admin Electronics IT Overall
Workability
The developed system /
program..
Mean SD Mean SD Mean SD Mean SD Mean VI

1. Operate what is it 4.93 0.27 4.67 0.58 4.85 0.38 4.80 0.42 4.85 HA
supposed to perform

2. Perform accordingly to 4.79 0.43 5.00 0.00 4.69 0.48 5.00 0.00 4.83 HA
the command

3. gives responses 4.79 0.43 4.67 0.58 4.69 0.48 4.60 0.52 4.70 HA
purposively

4. does not hang despite 4.50 0.52 5.00 0.00 4.46 0.52 4.50 0.53 4.53 HA
of invalid units

5. produce the accurate 4.71 0.47 4.67 0.58 4.85 0.38 4.60 0.52 4.73 HA
result.

Average Mean 4.74 0.25 4.80 0.35 4.71 0.19 4.70 0.30 4.73 HA

The result states that item 1 “The developed system / program operate

what it is supposed to perform”. Rank first with a overall mean of 4.85 and a

verbal interpretation of “Highly Accepted”. Second rank is item 2 “The developed

system / program perform accordingly to the command” with a overall mean of

4.83 and a verbal interpretation of “Highly Accepted”. Item 5 “The developed

system / program produce the accurate result” with a overall mean of 4.73 and a

verbal interpretation of “Highly Accepted” is in the third rank. Item 3 “The

developed system / program give responses purposively.” With a overall mean of

4.70 and a verbal interpretation of “Highly Accepted” on the fourth rank and

lastly, Item 4 “The developed system / program produce the accurate result.”

With a overall mean of 4.53 and a verbal interpretation of “Highly Accepted”


207

In terms of the Respondents "Admin" with an overall mean of 4.80 and a

verbal interpretation of "highly acceptable" is on the First rank. Second rank is

the "Electrical Experts" with an overall mean of 4.74 and a verbal interpretation of

"Highly Acceptable". Followed by "Electronics experts" with an overall mean of

4.71 and a verbal interpretation of "Highly Acceptable" and Lastly the "IT Experts"

with an overall mean of 4.70 and a verbal interpretation of "Highly Acceptable"

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the overall mean of 4.73

in terms of Workability.

Therefore the developed system operated what it is suppose to perform

and the program gave responses purposively

Table 5
Computed mean on the acceptability of Developed Appliance Wiring Control
System In terms of Efficiency
Electrical Admin Electronics IT Overall
Efficiency
The developed system /
program Mean SD Mean SD Mean SD Mean SD Mean VI

1. is significant and 4.79 0.43 5.00 0.00 4.69 0.48 4.80 0.42 4.78 HA
useful to the user

2. performs its tasks 4.64 0.50 4.67 0.58 4.85 0.38 4.80 0.42 4.75 HA
efficiently

3. uses effective 4.86 0.36 4.67 0.58 4.69 0.48 4.80 0.42 4.78 HA
graphical user interface

4. is effective in operation 4.64 0.50 5.00 0.00 4.92 0.28 4.70 0.48 4.78 HA
as measured by time

5. are capable of 4.86 4.36 0.58 4.77 0.44 4.70 0.67 4.78 HA
4.67
producing desired result

Average Mean 4.76 0.24 4.80 0.35 4.78 0.29 4.76 0.28 4.77 HA
208

The result states that in all of the Items, item 2 “The developed system /

program performs its task efficiently” only got a overall mean of 4.75 and a verbal

interpretation of “Highly Acceptable “ and the rest of the items which is item 1

“The developed system / program is significant and useful to the user”, item 3

“The developed system / program uses graphical user interface”, item 4 “The

developed system / program is effective in operation as measured by time” and

item 5 “The developed system / program are capable of producing desired

output” got a overall mean of 4.78 and a verbal interpretation of “Highly

Acceptable” as the highest rank.

In terms of the Respondents "Admin" with an overall mean of 4.80 and a

verbal interpretation of "highly Acceptable" is on the First rank. followed by

"Electronics Experts" with an overall mean of 4.78 and a verbal interpretation of

"Highly Acceptable". Lastly "Electrical" and "IT experts" with an overall mean of

4.76 and a verbal interpretation of "Highly Acceptable".

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the overall mean of 4.73

in terms of Efficiency.

And can be concluded that the developed system is easy to use for the

end user, because the instructions on how to use the system is clear and

understandable with the help of the graphical user interface. And can perform its

functions efficiently.
209

Table 6
Computed mean on the acceptability of Developed Appliance Wiring Control
System In terms of Reliability
Reliability Electrical Admin Electronics IT Overall
The developed system /
program VI
Mean SD Mean SD Mean SD Mean SD Mean
1. is modularly and can
easily be transferred in 4.50 0.52 4.33 0.58 4.77 0.44 4.90 0.32 4.68 HA
case of location transfer

2. can be placed in
strategic locations within 0.50 5.00 0.00 0.51 4.70 0.48 4.58 HA
4.36 4.62
the campus for easy
access

3. can perform 24/7 4.57 0.51 4.67 0.58 4.69 0.48 4.60 0.52 4.63 HA

4. wirings are properly


insulated to avoid 4.43 0.51 4.67 0.58 4.54 0.52 4.80 0.42 4.58 HA
electrocution

5. can perform its task 4.50 0.36 4.67 0.58 4.46 0.66 4.40 0.52 4.48 HA
without overheating

Average Mean 4.47 0.36 4.67 0.42 4.61 0.39 4.68 0.26 4.59 HA

It resulted that the item 1 “The developed system / program is modularly

and can easily be transferred in case of location transfer” as the highest rank with

aoverall mean of 4.68 and a verbal interpretation of “Highly Acceptable”. Second

rank is the item 3 “The developed system / program can perform 24/7” with a

overall mean of 4.63 and a verbal interpretation of “Highly Acceptable”. Third

rank goes to items 2 “The developed system / program can be placed in strategic

locations within the campus for easy access” and item 4 “The developed system /

program wirings are properly insulated to avoid electrocution” With a overall

mean of 4.58 and a verbal interpretation of “Highly Acceptable”. While item 5

“The developed system / program can perform its task without overheating” as
210

the last rank with a overall mean of 4.48 and a verbal interpretation of “Highly

Acceptable”

In terms of the Respondents "IT Experts" with an overall mean of 4.68 and

a verbal interpretation of "highly acceptable" is on the First rank. Second rank is

the "Admin" with an overall mean of 4.67 and a verbal interpretation of "Highly

Acceptable". followed by "Electronics Experts" with an overall mean of 4.61 and a

verbal interpretation of "Highly Acceptable" and Lastly the "Electrical Experts"

with an overall mean of 4.47 and a verbal interpretation of "Highly Acceptable"

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the overall mean of 4.73

in terms of Reliability.

Table 7
Composite table on the acceptability of Developed Appliance Wiring Control
System In terms of different criteria
CRITERIA Mean VI RANK
1. Accuracy 4.65 HA 4
2. Applicability 4.68 HA 3
3. Workability 4.73 HA 2
4. Efficiency 4.77 HA 1
5. Reliability 4.59 HA 5
Average Mean 4.68 HA

It resulted that “Efficiency” ranks first with the computed mean of 4.77 and

a verbal interpretation of “Highly Acceptable”. Second in rank is the “Workability”

with a computed mean of 4.73 and a verbal interpretation of “Highly Acceptable”.


211

Third rank is the “Applicability” with a computed mean of 4.68 and a verbal

interpretation of “Highly Acceptable”. Fourth rank is the “Accuracy” with a

computed mean of 4.65 and a verbal interpretation of “Highly Acceptable”. And

“Reliability” in the last rank with a computed mean of 4.59 and a verbal

interpretation of “Highly Acceptable”

The table shows that the Appliance Wiring Control System is “Highly

Acceptable” by the respondents as evidently shown by the average mean of

4.68.

The Significant difference on the level of Acceptability of the developed


Appliance Wiring Control System as evaluated by the four groups of respondent
in terms of the different criteria.
Table 8
ANOVA Results: Between the level of Acceptability of the developed
Appliance Wiring Control System as evaluated by the four
groups of respondents in terms of the different criteria
Sum of Df Mean F Sig. HO VI
Squares Square
Accuracy 0.563 3 0.188 2.842 0.051 FR NS
Between Groups 2.377 36 0.066
Within Groups 2.940 39
Total
Applicability 0.267 3 0.089 0.901 0.450 FR NS
Between Groups 3.557 36 0.099
Within Groups 3.284 39
Total
Workability 0.031 3 0.010 0.161 0.922 FR NS
Between Groups 2.344 36 0.065
Within Groups 2.375 39
Total
Efficiency 0.009 3 0.003 0.039 0.989 FR NS
Between Groups 2.675 36 0.074
Within Groups 2.684 39
Total
Reliability 0.303 3 0.101 0.832 0.485 FR NS
Between Groups 4.368 36 0.121
Within Groups 4.671 39
Total
212

The result reveals that the computed P-Value of 0.051, 0.450, 0.922,

0.989 and 0.485 in terms of Accuracy, Applicability, Workability, Efficiency and

Reliability. are greater than Alpha 0.05 level of significance thus, the null

hypothesis fail to reject

It implies that there is no significant difference between the perception of

the four groups of respondents on the level of acceptability of the Appliance

Wiring Control System. in terms of different criteria.

It signifies that the data provides statistically no significant evidence that

means on the acceptability of the systems are the same for all groups.
213

Chapter 4

FINDINGS, CONCLUSION AND RECOMMENDATIONS

The chapter presents the summary of findings, conclusion and

recommendations.

Summary of Findings

Based on the objective which is to develop and test the level acceptability

of the Appliance Wiring Control System, the following findings are hereby

summarized.

In terms of Accuracy, the developed system obtained a mean of 4.650 and

a verbal interpretation of “Highly Acceptable”.

With regards to Applicability, the developed system obtained a mean of

4.680 and a verbal interpretation of “Highly Acceptable”.

In terms of Workability, the developed system obtained a mean of 4.725

and a verbal interpretation of “Highly Acceptable”.

With regards to Efficiency, the developed system obtained a mean of

4.770 and a verbal interpretation of “Highly Acceptable”.

With regards to Reliability, the developed system obtained a mean of

4.585 and a verbal interpretation of “Highly Acceptable”.

The general weighted mean on the level of acceptability of the Students

Appliance Wiring Control System is 4.6820 with a verbal interpretation of “Highly

Acceptable”.
214

Conclusion

Based from the findings done, the researchers concluded that the system

is “Highly Acceptable” as evaluated by the terms of accuracy, applicability,

workability, efficiency and reliability


215

BIBLIOGRAPHY
216

.
217

APPENDIX A

Gantt Chart

June July Aug. Sept. Oct. Nov. Dec. Jan. Feb. Mar.

Planning

Creating the
appropriate thesis
title

Title Defense

Gathering of Data

Development of
Chapter 1

Development of
Chapter 2

Consultation of
Adviser , Critic
Reader and
statistician

Colloquium

Revision of
manuscript

Submission of Soft
bound Copies
Development of
Chapter 3 and 4
Determining the
acceptability of the
program
Consultant to the
panel member’s
APPENDIX B
218

LETTER TO CONDUCT THE STUDY

Republic of the Philippines


UNIVERSITY OF RIZAL SYSTEM
Cainta, Rizal

February 29, 2016

Prof. EDGARDO Y. CELESTIAL


Campus Director
University of Rizal System Cainta
Gate 1 Karangalan Drive, Karangalan
Village, Brgy. San Isidro Cainta, Rizal

Dear Sir:

Greetings of peace!

We are presently conducting a researching entitled “Appliance Wiring Control


System” as a requirement for the degree Bachelor of Information Technology.
In connection with this, may we request from your good office to allow us to
conduct the study in University of Rizal System Cainta. Rest assured that the
data will be treated with utmost confidentiality.
We fervently hope for your kindest approval.

Truly yours,

The Researchers
PATRICIA JOY C. CAGUIOA
KATHRINA GAILE S. ENOJADO
CHRIS JOHN E. GARRA
DANIEL E. NAVARRO III
JENNILYN E. PACHECO
CARLOS JERWIN P. SUAREZ

Noted:
Prof. RAYMOND RAMIREZ
Thesis Adviser
APPENDIX C
219

LETTER FOR RESPONDENTS

Republic of the Philippines


UNIVERSITY OF RIZAL SYSTEM
Cainta, Rizal

Dear Respondents,

Greetings!

We are presently conducting a study entitled “Development of Appliance Wiring


Control System” in partial fulfillment of the requirements for the degree, Bachelor of
Science in Information Technology.

You are chosen as one of the respondents who can provide pertinent information
necessary to our study, kindly accomplish the attached questionnaire checklist
supplying the needed data and rest assured that your response shall be treated with
outmost confidentiality.

Thank you very much for your cooperation and support!

Respectfully yours,

The Researchers

PATRICIA JOY C. CAGUIOA


KATHRINA GAILE S. ENOJADO
CHRIS JOHN E. GARRA
DANIEL E. NAVARRO III
JENNILYN E. PACHECO
CARLOS JERWIN P. SUAREZ

Noted by:

Prof. RAYMOND RAMIREZ


Thesis Adviser

APPENDIX D
220

QUESTIONNAIRE CHECKLIST

Republic of the Philippines

UNIVERSITY OF RIZAL SYSTEM

Cainta, Rizal

COLLEGE OF INDUSTRIAL TECHNOLOGY

Questionnaire-Checklist

Name:_______________________________________________

Evaluation of the System

Directions: Rate the presentation of each criterion by checking the appropriate

box to determine the acceptability of the developed APPLIANCE

WIRING CONTROL SYSTEM

The scales are as follows:

5 - Highly Acceptable

4 - Acceptable

3 - Moderately Acceptable

2 - Less Acceptable

1 - Not Acceptable

CRITERIA 5 4 3 2 1
1 Accuracy
221

The developed system / program…….


1.1 produces accurate results
1.2 gives desired output
1.3 Meets the users demand and needs
1.4 Provides a clear presentation
1.5 Provides complete data.
2 Applicability
The developed system / program…….
2.1 executes accordingly
2.2 have appropriate menus
2.3 provides accurate and precise information that
satisfies the needs of the user
2.4 is well design for the user
2.5 is easy to use
3 Workability
The developed system / program…….
3.1 Operate what it is it supposed to perform.
3.2 Perform accordingly to the command.
3.3 gives responses purposively
3.4 does not hang despite of invalid units
3.5 Produce the accurate result.
4 Efficiency
The developed system / program…….
4.1 is significant and useful to the user
4.2 performs its tasks efficiently
4.3 Uses effective graphical user interface.
4.4 is effective in operation as measured by time
4.5 Are capable of producing desired result.

CRITERIA 5 4 3 2 1
5 Reliability
The developed system / program…….
5.1 is modularly and can easily be transferred in case
of location transfer
5.2 can be placed in strategic locations within the
campus for easy access
5.3 can perform 24/7
5.4 wirings are properly insulated to avoid
electrocution
5.5 can perform its task without overheating
222
223

APPENDIX E

Statistical Formula

Mean:

x̅ = ∑ x

Where:

x̅ = mean

∑x = sum of all data value

N = number of data values

For interpretation of the result, the following scale was used.

5 - Highly Acceptable

4 - Acceptable

3 - Moderately Acceptable

2 - Less Acceptable

1 - Not Acceptable
224

APPENDIX F

Republic of the Philippines


UNIVERSITY OF RIZAL SYSTEM
Cainta, Rizal

COLLEGE RESEARCH COUNCIL

College of Industrial Technology

February 22, 2017

To: Faculty Concerned

This College

SIR / MADAM:

In Consider of your qualification in the field of research, the College Research Council
represented by the undersigned, upon the recommendation of the Research Instructor has
approved your appointment to perform the following functions.

Name Conformed Date

Adviser Mr. Raymond A. Ramirez ____________ _________


Critic Reader Mrs. Jackielou B. Elardo ____________ _________
Statistician Mrs. Rebecca R. Amagsila ____________ _________
Panel Chairman Mr.Avelino L. Reyes ____________ _________

The Student who shall be under your oral security includes:

Name Course / Major:

Patricia Joy C. Caguioa BSIT


KathrinaGaile S. Enojado BSIT
Chris John E. Garra BSIT
Daniel E. Navarro III BSIT
Jennilyn E. Pacheco BSIT
Carlos Jerwin P. Suarez BSIT

They shall prepare / defend their approved thesis proposal entitled DEVELOPMENT OF
APPLIANCE WIRING CONTROL SYSTEM As part of the partial fulfilment of the requirement for
the degree, BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY.

Thank you for your support and cooperation to the Research Program of the College.

Very truly yours,

Noted:

AVELINO L. REYES MORGAN G. SIBAL

Research Instructor Dean, CIT


225

APPENDIX G

CERTIFICATION FROM STATISTICAL CENTER


226
227

PATRICIA JOY C. CAGUIOA


Address: 151 I.Lopez St. Brgy. Poblacion, Mandaluyong City
E-mail: pattyjoycaguioa@gmail.com
Contacts: +639467262907

PERSONAL INFORMATION

Age: 19 years old


Date of Birth: August 03, 1997
Place of Birth: Mandaluyong Hospital
Gender: Female
Height: 5’4”
Weight: 62 kg.
Religion: Roman Catholic
Citizenship: Filipino
Civil Status: Single
Father’s Name: Eduardo Caguioa
Occupation: Admin Aide III
Mother’s Name: Josephina Caguioa
Occupation: Housewife
Language or Dialect Spoken & Written: Tagalog, English, KOREAN 

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
BS Information Technology
(2014-present)

Secondary: Francisco P. Felix Memorial National High


School
Municipal Compound, Brgy. Sto. Domingo,
Cainta, Rizal
(2010-2014)

Elementary: San Isidro Elementary School


P. Ocampo St. Brgy. San
Isidro
Taytay, Rizal
(2004-2010)
228

KATHRINA GAILE S. ENOJADO


Address: 50 Sampaguita St. Tres Hermanas Vill. Antipolo City
E-mail: kathrina.enojado@yahoo.com
Contacts: +639361827447

PERSONAL INFORMATION

Age: 19 years old


Date of Birth: July 28, 1997
Place of Birth: Quezon City
Gender: Female
Height: 5’6”
Weight: 52 kg.
Religion: Roman Catholic
Citizenship: Filipino
Civil Status: Single
Father’s Name: Clayde Jorgen G. Enojado
Occupation: Driver and Technician
Mother’s Name: Marilyn S. Enojado
Occupation: Housewife
Language or Dialect Spoken & Written: Tagalog, English, KOREAN 

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
BS Information Technology
(2014-present)

Secondary: Diadem Christian Academy


50, Ocean Street, Summerville Subdivision,
Mayamot, Antipolo
(2010-2014)

Elementary: Mambugan Elementary School


Agnes Ville Subdivision, Barangay
Mambugan, Antipolo City, Rizal.
(2004-2010)
229

Chris John E. Garra


Address: Blk 41 Lot 33 ZontavilleBrgy. San Isidro Antipolo City, Rizal
E-mail: cjgarra24@yahoo.com
Contacts: +639488838144

PERSONAL INFORMATION

Age: 20 years old


Date of Birth: November 05, 1996
Place of Birth: Antipolo City
Gender: Male
Height: 5’7”
Weight: 50 kg.
Religion: Roman Catholic
Citizenship: Filipino
Civil Status: Single
Father’s Name: Eddie M. Garra
Occupation: Technician
Mother’s Name: Edna Espina
Occupation: Housewife
Language or Dialect Spoken & Written: Tagalog, English,

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
BS Information Technology
(2013-present)

Secondary: BagongNayon II National High School


Lower San Isidro
Antipolo City, Rizal
(2009-2013)

Elementary: BagongNayon IV Elementary School


Lower San Isidro
Antipolo City, Rizal
(2003-2009)
230

DANIEL ESPINO NAVARRO III


Address:Blk.48 Lt.13 Karangalan Village, Cainta Rizal
Email: navarro_daniel25@yahoo.com
Contacts: +63155626368

PERSONAL INFORMATION

Age: 19 years old


Date of Birth: August 25, 1997
Place of Birth: Labrador Pangasinan
Gender: Male
Height: 5’11”
Weight: 62 kg.
Religion: Roman Catholic
Citizenship: Filipino
Civil Status: Single
Father’s Name: Daniel F. Navarro Jr.
Occupation: Civil engineer
Mother’s Name: Elizabeth E. Navarro
Occupation: Day care worker
Language or Dialect Spoken & Written: Tagalog, English,

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
BS Information Technology
(2014-present)

Secondary: Labrador National High


School
Labrador Pangasinan
(2010-2014)

Elementary: Bongalon Elementary School


Bongalon Labrador Pangasinan
Labrador Pangasinan
(2004-2010)
231

JENNILYN E. PACHECO
Address: F18 Manolotost Felix SubdBrgy San Andres Cainta, Rizal
E-mail: jenneypache@gmail.com
Contacts: +639305711285

PERSONAL INFORMATION

Age: 19 years old


Date of Birth: January 05, 1998
Place of Birth: Angono Hospital
Gender: Female
Height: 5’0”
Weight: 52 kg.
Religion: Brethren Christian
Citizenship: Filipino
Civil Status: Single
Father’s Name: Edgardo Pacheco
Occupation: Construction Worker
Mother’s Name: Sheryl Espiritu
Occupation: -
Language or Dialect Spoken & Written: Tagalog, English

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
BS Information Technology
(2014-present)

Secondary: Francisco P. Felix Memorial National High


School
Municipal Compound, Brgy. Sto. Domingo,
Cainta, Rizal
(2010-2014)

Elementary: Francisco P Felix Elementary School


PascualStBrgy.San Andres
Taytay, Rizal
(2004-2010)
232

CARLOS JERWIN P. SUAREZ


Address: 002 J. Basig St. Brgy San Roque Cainta, Rizal
E-mail: bfabbjerwin@gmail.com
Contacts: +63206611352

PERSONAL INFORMATION

Age: 20 years old


Date of Birth: April 16, 1996
Place of Birth: RPH Morong
Gender: Male
Height: 5’6”
Weight: 45 kg.
Religion: Roman Catholic
Citizenship: Filipino
Civil Status: Single
Father’s Name: Armando Suarez Jr.
Occupation: Driver
Mother’s Name: Anna Liza Suarez
Occupation: Housewife
Language or Dialect Spoken & Written: Tagalog, English

EDUCATIONAL ATTAINMENT:
Tertiary: University of Rizal System
Gate 1 KarangalanCainta Rizal
DT Electronics
(2012-2014)

University of Rizal System


Gate 1 KarangalanCainta Rizal
BS Information Technology
(2014-present)

Secondary: Manggahan High School


Manggahan Pasig City
(2008-2012)

Elementary: Cainta Elementary School

Cainta, Rizal
(2002-2008)

You might also like