Вы находитесь на странице: 1из 216

1

ABSTRACT

The researchers of this study aimed to develop a computerized

registration system for Aloha Inland Resort in Sto. Tomas, Davao del Norte

entitled “AUTOMATED HOTEL RESERVATION AND BILLING SYSTEM” of

which it would provide efficiency and accuracy on the management of records of

the said establishment.

Since the inception of its business, the said resort used and adopted a

manual type of system while dealing all its transactions such as booking or

reservations and of payments or billings. Challenged with problems existed in

their manual system of transactions, the researchers identified the problems,

analyzed and assessed the problems whether efficiency and accuracy in the said

system were manifested. The researchers used a descriptive method to solve the

problems. It was then learned that the manual system has rarely accurate and

efficient in all the transactions involved in the hotel.

Thus, the researchers proposed that an automated Hotel Reservation and

Billing System be developed to replace the manual system of transactions in the

said hotel.
2

CHAPTER 1

THE PROBLEM AND ITS SETTING

INTRODUCTION

Peoplehavealwaystraveled,whetheritisto discovernewplaces, conquer

the worlds,forbusinessorpleasure.Thisneedofmanhasconsequentlyledto

thedevelopment ofaccommodationfacilities.GrayandLiguori(2003)saidthat“inns’

keepinghasthroughtheagesbeencloselyassociatedwithtravel,alwaysadaptingits

elfto thechangingneedsof thetraveler(p. 10)”

A hotel is a business establishment that offers a short-term lodging which

guests pay a corresponding fee for the accommodation and other services

provided for them. The concept of paid lodging was brought over, in distant past,

the necessity to accommodate the travelers from different places. The concept of

hotel as a business establishment has brought an enormous change in the lives

of travelers. Accommodation was limited then to a single room with a single bed,

a small table, a washstand basin, a towel and some utensils such as cup, spoon

and fork.

Thus, giving ofaccommodationisa“people”business.


3

Itexiststoprovideservicestothe

travelingpublicandatthesametimeneedspeopletorunit. Ahotel,forexamplecanbea

simpleroominghouseoratwentystoreybuildingthatprovidesroomforrentorfoodand

beverage,service,butonevitalingredientiscommon–

itmustbea“homeawayfromhome.”

Guestsusuallywanttheirhomestobeattractive,clean,relativelyquietandsafe,

basicrequirementsthattheyusuallylookforinahotel.Vacationers,forinstance,wantti

me

awayfromworksotheyexpectaquietatmospherethatwillbeconduciveforrelaxation.

Also,theyexpectthattheirlives,aswellastheirpersonalbelongingswillbeprotected

throughsafetyandsecuritymeasuresthatthehotelshave. Ontheotherhand,thereare

clientswhoarenotsatisfiedwith whattheyhaveintheirhomes,sotheirstayinahotel

offersthemanopportunitytoexperienceastyleoflivingthattheycanonlydreamof(Wei

ssinger,2000).

Computerautomations using Hotel Reservation and Billing

Systeminthehospitalityindustrywasfirstintroducedinthe1970but

wasnotconsideredviablebecausetheywereexpensivethatonlylargehotelscouldus

e them. However,bythelate1980s,hotelsofall

sizesfoundthesesystemscosteffectiveand userfriendly. Today,there

arefrontofficesoftwarepackagesdesignedtoassistthefrontoffice

employeesperformfunctionsrelatedtoreservationsmanagement,roomsmanagem
4

ent, guestaccountmanagementandgeneralmanagement(Kasavana,1991).

Walker(2004)explainsthatcentralreservationssystemsareusedforaccurateguestr

eservationsand billingsthat canbecompletedquicklyandwithlesserror. It is worth

noting that hotels have raised their standards to continuously provide best

services and deliver these services fast, accurate and at optimum level.

It is on this idea that the researchers would like to create a reservation

system in hotel to fast track booking and reservations from expected

customers.

BACKGROUND OF THE STUDY

Aloha Inland Resort is one of the medium-sized hotels located at

Marscon, Sto. Tomas, Davao del Norte. Aloha Inland Resort was established

on October 28, 2002. It is a family corporate business owned by Mr. and Mrs.

Hipolito Lomboy. Aloha Inland Resort was built to be a classy amusement

center in Sto. Tomas. It is the only hotel in Santo Tomas that offers various

services that includes hotel and accommodation and fine dining. Aside from its

usual services, the resort also has other amenities that can cater the needs of

the guests like swimming pool, videoke rental, resort canteen, cottages,

function hall and a restaurant for events and special gatherings.


5

Aloha Inland Resort derives its name from the Hawaian word “Aloha” which

means hello or welcome. The owner, Mr. and Mrs. Hipolito Lomboy, named the

resort Aloha Inland Resort after they migrated in Hawaii to look for greener

pastures. And after ten years of hard labor, they went back home in the

Philippines and invested their hard earned money to builda water amusement

facility in Santo Tomas. Hence, Aloha Inland Resort was built.

Aloha Inland Resort offers hotel accommodations with affordable rates.

Each room type is classified according to its inclusive amenities such as

television, aircondition unit, telephone, tables and the like.

ROOM TYPE ROOM RATE


DE LUXE PHP 750.00
SUPER DELUXE PHP 1,000.00
VILLA (Single) PHP 3,500.00
VILLA (Double) PHP 4,000.00
FAMILY ROOM (Single) PHP 1, 800.00
FAMILY ROOM (Double) PHP 2, 000.00

Table 1. Aloha Inland Resort Room Type and Room Rates

Since its operation, all business transactions of Aloha Inland Resort are

done manually. The front desk office of the resort uses only manual transaction

system for room recordings, checking in and out, reservation and billing.

However, the front desk office encounters problems using manual system due to
6

inaccuracy of records specifically in billings, guests’ reservations, room

assignments, sales monitoring and other similar settings that deals with records

management of the resort. The researchers are very much concerned about this

existing malady that beset the hospitality industry specifically to the Aloha Inland

Resort. Challenged by these problems, the researchers are prompted to

undertake this study.

STATEMENT OF THE PROBLEM

Generally, this study was focused on the management of records

using Manual Hotel Reservation and Billing System of Aloha Inland Resort in

relation to room recordings, billings, guests’ reservations, room assignments,

sales monitoring and the like. This study aims to determine the business

performance of Aloha Inland Resort in Sto. Tomas, Davao del Norte.

1. What is the extent of manual hotel reservation and billing system when

analyzed according to

1.1 Efficiency

1.2 Accuracy?

2. What is the extent of manualprocessing of reservation and billing when

assessed in terms of :

2.1 Efficiency

2.2 Accuracy?
7

3. What is the level of manual hotel reservation and billing system in terms of

its operations when analyzed according to:

3.1 Efficiency, and

3.2 Accuracy?

4. What is the respondent’s level of perception towards manual hotel

reservation and billing system when analyzed according to:

4.1 Efficiency, and

4.2 Accuracy?

REVIEW OF RELATED LITERATURE AND STUDIES

Many articles were perused, reviewed and validated by the researcher

from professional books, periodicals, journals and other sources. The validated

literature and studies included in this study were believed to have direct

bearings on the present study. These related literature and studies were

framedas references in this study. Furthermore, these literature and studies help

enrich the contents of this thesis. These literatures and studies conducted were

with global, national and local perspectives which help to provide pertinent data

and information relevant to the conduct of the study.

A. RELATED STUDIES

The following literature and studies were considered related to the

presentstudy, hence it was included in this chapter.


8

Corporate Reservation Systems (CRS) is an independent agency used

DOS FoxPro System to book approximately 100,000 hotel rooms each year on

behalf of its corporate clients. CRS pre-negotiates special rates with some

15,000 hotels worldwide, offers these discounted rates to their clients then

organises all the bookings and the paperwork. Details of the original booking,

booking changes, confirmations, etc. needed to be communicated to both hotels

and clients in a speedy and efficient manner, either by fax or by e-mail. This

process had to be fully automatic with no manual typing in of fax numbers and

had to be capable of coping with thousands of messages a day.

Embassy Suites Niagara Falls,the largest Falls’ view hotel tower,used

GuestServe Online Reservations Systemsfor online hotel reservations,

reservations tracking and mass mailing services. GuestServe Online

Reservations system is the primary solution as both Merlin Metrics and

Ripplemail have been designed to work in conjunction for the purpose of

processing millions of dollars in hotel reservations. In short, Merlin Metrics tracks

where reservations are originating and Ripplemail allows for further contact with

past guests and mailing list members.

Hotel El Mirador in Rocky Point Mexico is a beachfront hotel with

approximately 60 rooms. With the potential to be the most sophisticated property

in the area, Hotel El Mirador was searching for aninternet- based property

management software that can be managed remotely. The administrative team


9

was looking to stay hands on with their property from distant locations. With an

increasing number of reservations, they decided and they needed an enhanced

reservation/customer management system.ResortPRO provides Hotel El Mirador

with all the mobility and remote accessibility any traveling property manager

could need. As long as the user has access to the internet they can be fully

connected and hands on with their rental property. Each reservation made with

ResortPRO has a detailed reservation folio area to track all client/reservation

information. The reservation folio helps provide sound customer service and

enables complete management of any action that could occur within that

reservation.

Manila Legend Hotels International Corporationis a chain of super

value hotels in Manila that provides above standard accommodations to a wide

range of clientele - company executives, families, OFW's, balikbayans, provincial

business travelers, students, local and foreign tourists.As varied as their needs

are, Legend Hotels International uses a web-based online hotel reservation

system that can accommodate the bookings of their customers worldwide. It aims

to speed-up the transaction in real time and served it with efficiency and

accuracy. Through the use of the online reservation and billing, the front desk

officers can virtually check the different rooms in real time. Aside from checking

the availability of the rooms, the system also is embedded with customize

functions for the customers who wishes to avail additional services.


10

Pan Pacific Manilais the first 5-star hotel in Manila that offers luxury

service at the tip of the button which is included in a consolidated concept of

personalized attention. Their hotel packages are tailor-made to their desired

length of stay. Pan Pacific Manila uses online automated hotel reservation and

billing system since their prime targets are tourist who wishes to stay in Manila

for vacation, leisure, trips, conferences and other similar settings. Since the

integration of the automated reservation and billing system their hotel services

were rated with satisfaction from their customers. The ease of fast reservation

and meager rates were possible due to the fast delivery of service and the like.

Marco Polo Hotel is standing in the heart of Davao’s shopping and

business district, with 245 elegant guest rooms and suites it is one of the five

stars hotel in Davao that uses automated hotel reservation system. Travelport

provides Galileo for Marco Polo Hotel. Galileo is a computer reservations system

(CRS) owned by Travelport which Marco Polo Hotel uses as their online hotel

reservation and billing system.

B. RELATED LITERATURE
11

Jeong et al. (2005) discussed the role of website quality in attracting

online bookings and empirically test their proposed model with potential lodging

customers. Authors indicate that information completeness and ease of use are

important determinants of website quality. Schegg et al. (2002) analyze

Swisshotel websites over different criteria and conclude that they provide

staticinformation and limited transactional functions.

Law and Hsu (2006) assessed the dimensions of hotel websites

(information) regarding the reservation, hotel facilities, contact details of the

property,surrounding area and website management) and attributes in each

dimensionmostly valued by online users. Some of the most important website

attributesare found to be the room rates, availability and security of payments (in

thereservation information dimension), the location maps, hotel and

roomamenities (in facilities information), telephone, address and e-mail of the

hotel(for contact information), transportation to the hotel and airports.

Jaehnig (2010) cited a system for obtaining associated personal data of a

person attending a reception site in order to provide a response to such

person.This includes a computer operable disposed at the reception site with an

operating software for receiving personal name and address information.

Accordingly, the present invention is directed to a system for obtaining

associated personal data of a person.

Das (2010) reiterated that a payment system is a system for the transfer of

money. What makes it a "system" is that it employs cash-substitutes; traditional


12

payment systems are negotiable instruments such as drafts (e.g., checks), credit

cards and other charge cards, documentary credit (such as L/C) and electronic

funds transfers. Some payment systems include credit mechanisms, but that is

essentially a different aspect of payment. Payment systems are used in lieu of

tendering cash in domestic and international transactions and consist of a major

service provided by banks and other financial institutions. In the US, they are

regulated by different state statutes (UCC) and Federal regulations.

Additional forms of payment systems (including physical or electronic

infrastructure and associated procedures and protocols) are used to

settle financial transactions in automated teller machine networks, stored-value

card networks, bond markets, currency markets, and futures, derivatives,

or options markets, or to transfer funds between financial institutions. Due to the

backing of modern fiat currencies with government, payment systems are a core

part of modern monetary systems.

The term electronic payment can refer narrowly to e-commerce - a

payment for buying and selling goods or services offered through the Internet, or

broadly to any type of electronic funds transfer.

THEORETICAL AND CONCEPTUAL FRAMEWORK


13

Aloha Inland Resort took room reservations from a few months to one

day in advance. Prospective guests can cancel their reservations anytime before

the day the rooms were required; cancellations were made with no penalty.

Other major sources of room demand were stay over and walk-in. Occasionally,

trips must be taken on short notice, forcing the traveler to seek accommodations

as walk-ins.

This study theorized that by using Automated Hotel Reservation and

Billing System there will be accuracy of records related to room reservations,

assignments, recordings, computation of bills, guests’ reservations and sales

monitoring. Hence, front desk staff or personnel of Aloha Inland Resort must

accommodate guests with utmost attention and priority and by giving them the

correct information they to need to avail the hotel services.

Roldan ( 2004) states that .the key to the success of a hotel business is a

service which starts with the first contact between the guest and the hotel

personnel of the Front Office. The way guests are received and treated is very

vital because this becomes the basis of their first impression and conditions their

disposition about the other services of the hotel. If guests receive the brand of

hotel hospitality at the onset, this can mean repeated patronage in the future.

The Front Desk takes charge of guests’ registration as they arrive;

assigning of rooms; handling of room keys, telephone messages, room


14

payments, recording of guests information and serves a communication center

for guests requiring information about hotel facilities/services, points of

interest, transportation schedules and others.

Accepting and processing of reservations for room bookings is the

function of the front desk staff or personnel. Reservations are received and

accepted through the telephone, computer reservations systems (CRS) or

through direct personal contact. It also handles inquiries about room rates and

arrangements.

In an Automated Hotel reservation and billing system, guests can make

reservations specifying the accommodation requirements such as room type,

duration and number of rooms. The system selects a suitable hotel and check

the availability of rooms in that hotel. Then the system calculates the charges

and displays the reservation details including the required charges to the

customer. The customer confirms the reservation. Then the system generates

booking details that will be stored in the database.


15

SIGNIFICANCE OF THE STUDY


16

This study on hotel reservation and billing problems of Aloha Inland

Resort is of prime importance to the management and staff of the said resort for

the Automated Hotel Reservation and Billing System will make the

establishment more efficient in terms of providing faster and more efficient

quality service. This shall help the resort obtain and maintain accuracy and

integrity in their transactions. This will also benefit students and future

researchers to serve as reference in conducting researches of similar nature

and topic.

DEFINITION OF TERMS

Reservation - an arrangement to secure accommodations at a

restaurant or hotel, on a boat or plane.

System

-any formulated, regular, or special method or plan ofprocedure. A working

combination of hardware, software, and data communications devices.

Manual - involving or using human effort, skill, power, energy,

etc.; physical: manual labor.

Hotel Reservation and Billing System - is a computerized or

automated reservation and billing system that is designed to manage all types

of hotel bookings and or accommodations.


17

Accommodation is a dwelling or place of temporary residence.

Hotel - is an establishment that provides paid lodging on a short-

term basis.

Front Desk - is an employee who is specifically employed by an

organization to receive or greet any visitors, patients, or clients.


18

CHAPTER 2

METHOD

Presented in this chapter is the data used to conduct the study. The

researchers present how the data was gathered and where it is conducted.

Research Design

The researchers employed the descriptive-normative survey method. The

descriptive method is basically a technique of quantitative and qualitative

methods to gauge the relationship of its indicators and variables. According to

Calmorin (2007), descriptive research design provides essential knowledge

about the nature of objects and persons and supply facts on which scientific

judgments may be based. The term normative is equivalent to survey because it

gathers data regarding the current conditions by identifying normal or typical

practices with accepted norms or models. In this study, it presented facts about

the manual hotelreservation and billing system of Aloha Inland Resort.

Specifically, it described facts regarding the efficiency and accuracy of the said

manual system.
19

Research Subject

The participants of the study are the employees and managers of Aloha

Inland Resort which the researchers believed can be of good source of

information in assessing and evaluating the manual hotel reservation system.

The researchers have disseminated 30 survey questionnaires to the respondents

as participants of the study. These employees hold various positions in the resort

from top management down to the personnel/staff.

Research Instrument

In the absence of standardized instrument the researchers constructed a

validated self-made survey questionnaire. The questionnaires used are all guided

response type which is believed to be vital to answer the problem under the

study. The researchers made questions on the respondents regarding the

efficiency and accuracy of manual hotel reservation system in Aloha Inland

Resort.

Data Gathering Procedure

The steps followed by the researchers in the gathering of data are as

follows:

1. Seeking Permission to Conduct the Study. The researchers furnished a

letter of permission to conduct a survey regarding the efficiency and accuracy of

manual hotel reservation system in Aloha Inland Resort.


20

In determining the efficiency and accuracy of manual hotel reservation

system; a five point rating scale will be used:

Points Descriptive Descriptive Interpretation

Ratings Equivalent

5 Always 4.5 – 5.0 This indicates that the action

taken in determining the

efficiency and accuracy of

manual hotel reservation

system is always manifested.

4 Oftentimes 3.50 – 4.49 This indicates that the action

taken in determining the

efficiency and accuracy of

manual hotel reservation

system is oftentimes

manifested.

3 Sometimes 2.50 – 3.49 This indicates that the action

taken in determining the


21

efficiency and accuracy of

manual hotel reservation

system is manifested

sometimes.

2 Rare 1.50 – 2.49 This indicates that the action

taken in determining the

efficiency and accuracy of

manual hotel reservation

system is rarely manifested.

1 Never 1.00 – 1.49 This indicates that the action

taken in determining the

efficiency and accuracy of

manual hotel reservation

system is not manifested.

2. Distribution of the Questionnaire. Upon approval, the questionnaires

have been administered to the respondents.


22

3. Retrieval of the Questionnaire. The researchers retrieved the

questionnaire after the respondents answered the questions asked and the

gathered data were tallied, analyzed and subjected to statistical analysis.

Statistical Treatment of Data

The following statistical toolis employed in the analysis and interpretation

of data.

Mean. this statistical tool was used to compute and determine the

efficiency and accuracy of manual hotel reservation system in Aloha Inland

Resort.
23

CHAPTER 3

PRESENTATION, ANALYSIS AND INTERPRETATION OF FINDINGS

SCREEN SHOTS INPUT

Figure 1. Log-in Form

This form serves as the main entry to the application. Users of this
application shall provide the correct username and password to gain
access.
24

CHAPTER 4

SUMMARY, CONCLUSION AND RECOMMENDATION

Presented in this chapter is the summary of findings, conclusion and

recommendations of the study.

Summary of Findings

The answers of the following questions raised in the first chapter of this

study are herein summarized:

1. What is the extent of manual hotel reservation and billing system when

analyzed according to

a. Efficiency

b. Accuracy?
25

The extent of manual hotel reservation and billing system in terms of

booking and/or registration and of billing system gets an over-all mean of 2.36

with descriptive equivalent of rare. This statistical figure indicates that

efficiency and accuracy is rarely manifested.

2. What is the extent of manualprocessing of reservation and billing when

assessed in terms of :

a. reservation

b. billing?

The extent of manual hotel reservation and billing system when

assessed in terms of reservation and billings obtains an over-all mean of 2.3

with a descriptive equivalent of rare which indicates that the perception of the

respondents’ toward accuracy and efficiency using the manual hotel reservation

and billing system is rarely manifested.

3. What is the level of manual hotel reservation and billing system in terms of

its operations when analyzed according to:

a. Efficiency, and

b. Accuracy?
26

The level of manual hotel reservation and billing system in terms

of its operations obtains a mean of 2.12 for efficiency with a descriptive

equivalent of rare while for accuracy it obtains a mean of 2.48 with a

descriptive equivalent of sometimes. This statistical figure gives an over-

all mean of 2.3 with a descriptive equivalent of rare which only indicates

that operations involved in the manual system does not guarantee

efficiency and accuracy. Hence, with the given figure it suggests that

efficiency and accuracy manifests rarely.

4. What is the respondent’s level of perception towards manual hotel

reservation and billing system when analyzed according to:

a. Efficiency, and

b. Accuracy?

The level of perception of the respondents towards manual hotel

reservation and billing system when analyzed according to efficiency and

accuracy obtains an over-all mean of 2.31 with a descriptive equivalent of rarely

accurate and efficient. With a mean of 2.09 for efficiency this only indicates that

respondents of this study perceives that the manual reservation and billing

system is rarely efficient while a mean of 2.54 suggests that accuracy is

sometimes accurate.
27

Conclusions

Based on the findings of the study the following conclusions are drawn.

1. Using Manual Reservation and Billing system, efficiency and accuracy is

rarely manifested. This suggests that efficiency and accuracy in

procedures taken or the operations involve in processing the reservation

and the billing system is rarely manifested.

2. The extent of manual hotel reservation and billing system when assessed

in terms of reservation and billings obtains indicates that the perception of

the respondents’ toward accuracy and efficiency using the manual hotel

reservation and billing system is rarely manifested.


28

3. The level of manual hotel reservation and billing system in terms of its

operations only indicates that operations involved in the manual system

does not guarantee efficiency and accuracy. Hence, efficiency and

accuracy manifests rarely.

4. The level of perception of the respondents towards manual hotel

reservation and billing system when analyzed according to efficiency and

accuracy indicates that respondents of this study perceives that the

manual reservation and billing system is rarely efficient and rarely

accurate.

Recommendations

In light of the foregoing findings and conclusions of the study, the

researchers recommend the following:

1. That a computerized Hotel Reservation and Billing System shall be

proposed to the management of Aloha Inland Resort to obtain

efficiency and accuracy in its operation.


29

RESEARCH DESIGN

The study make used of the Systems Development Life Cycle since it

aims to develop a new automated Hotel Reservation and Billing System. The

SDLC plays an important role in developing the said system. The researchers

explained the purpose of this study to the management and staff of Aloha Inland

Resort.

INITIAL INVESTIGATION

The researcher conducted a study in manual transaction system. It was


30

learned that in manual transaction system, the front desk encounters a lot

problems particularly in making room reservations for the customers. Recording

is done using pen and paper only. Issuances of receipts are likewise in paper

also. Sales monitoring and customer tracking can hardly be achieved since it

would take time to find the necessary records. Added also are the specific

problems that the researchers discovered.

1. Sales Monitoring

2. Room monitoring

3. Less data integrity/Low-in security

4. Difficulty in searching and retrieving file

5. Loss of records and retrieving files

6. Difficulty in finding the availability of rooms

This prompted the researcher to propose an automated Hotel Reservation

and Billing System.

SYSTEM ANALYSIS

The researcher conducted series of interview to gather data and a

questionnaire is distributed to specifically indentify the transaction points and

decisions handled in the manual system. The researchers observed carefully the

front desk personnel. The data gathered at this stage were subjected for

analysis and assessment based on the operations performed in the actual

system. The researcher specified the user requirements that will be integrated in

the proposed automated Hotel Reservation and Billing System.


31

SYSTEM DESIGN

In this stage, the researcher designed the different forms of the proposed

automated Hotel Reservation and Billing system. Each form is classified

according to its purpose and function based on the user-requirements specified

and gathered by the researchers. The researchers carefully designed each form

with the necessary controls and modules that will form part of the automated

Hotel Reservation and Billing System.

DEVELOPMENT AND CODING

The researchers encoded the source code of the proposed automated

Hotel Reservation and Billing System. The computer language used in this

system was the Microsoft Visual Basic 6.0 Professional Edition. The researcher

used the MS Visual Basic 6.0 because it is an object-oriented programming

language. At this stage, the researchers transformed each specification to

program codes to form part of the proposed system and t he major decisions about

the system had been integrated.


32

SYSTEM TESTING

The researchers tested the automated Hotel Reservation and Billing

System to detect errors of the system. The front desk personnel were given an

orientation of the system on how it will be handled or used by the hotel

personnel. The researchers observed the front desk personnel and noted the

behavior and performance of the automated Hotel Reservation and Billing

System. The researchers aimed at evaluating the capability of the program if it

meets the expected or required results.

IMPLEMENTATION AND MAINTENANCE

The researchers implemented the automated Hotel Reservation and

Billing System after user acceptance. The researchers installed the automated

system including its modules, reports and functions. Trainings will also be given

to the users specifically the front desk personnel. Major trainings included on how

to execute the new implemented system, how to enter the data, how the process

the data or the processing details and how to take out the reports. The

researchers maintained the system by checking its integrity and functionality

related to its working environment. Some errors found in the system were noted
33

and corrected. Review of the system from time to time was part of the

maintenance activity.

RESEARCH SUBJECT

The Aloha Inland is the subject of our study.

SCOPE AND DELIMITATION OF THE STUDY

This study is focused on developing a business application using an

Automated Hotel Reservation and Billing System that enables hotel to track

services in real time and to provide accurate and reliable process on every

transaction especially in a hotel reservation and billing. This study looked into a

better impact of using the said technology. With this study it can help the

management of the resort to identify the differences of using manual system and

an automated system. The researchers have made the following limitations in

this study:

Systems Limitation. The proposed automated Hotel Reservation and

Billing System is limited only to room reservation, check-in and check-out only.

Payments are reflected only when guests are going to leave the rooms. The

proposed system is not programmed to accommodate additional services in

terms of charges and other similar settings.

DATA GATHERING PROCEDURE

The study was conducted among the front desk personnel of Aloha Inland
34

Resort. On the onset, permission to conduct the study was sought from the

owner of the said inland resort. Once permission was obtained, the researcher

met the front desk personnel to explain the purpose of the study and the

rationale of using an automated Hotel Reservation and Billing System. A series

of interviews were conducted and a questionnaire was distributed and gathered

after the interview. The retrieval of questionnaire was done immediately. The

data gathered were then analyzed, compared and interpreted. Weak areas were

identified of the manual transaction system and made as basis for

recommendations for the development of an automated Hotel Reservation and

Billing system.
35

Figure 2. Room Rates Form. This form serves as the main setting to change
the rates of each room. Users can update, modify and each rate.

Figure 3. Standard Room Single. This form features the standard single
room. Text fields should be filled properly to execute reservation, check-in
and check-out.
36

Figure 4. Family Room Double. This form features the family room double.
Text fields should be filled properly to execute reservation, check-in and
check-out.
37

Figure 5. VIP Room Double. This form features the VIP room double. Text
fields should be filled properly to execute reservation, check-in and check-
out.

SCREEN SPECIFICATION – OUTPUT

DISCUSSION

SUMMARY

CONCLUSION

RECOMMENDATION
38

Figure 1. Client Master Report. This forms shows all the transactions
transpired using the system. It shows the room number, room type, name,
date checked-in and checked-out as well as the corresponding charges.
39

FFiF

Figure 2. Room Rates. This form shows the corresponding room rates of
the Hotel. Room Types and rates are shown in the form.
40

Figure 3. Rooms Master List. This form shows the master list of all rooms
in the hotel. It also shows the status of the room ( available, used and
reserved).
41

Figure 4. Status Report. This form shows the status of the room. It shows
the name of the occupant, the address, the age, date checked-in and date
checked-out including the corresponding charges.

APPENDIX A
42

LETTER ASKING PERMISSION AND APPROVAL

TO CONDUCT THE STUDY

PERMISSION TO CONDUCT A STUDY

December 10, 2010

PRESCILDA L. LUIS
Manager
Aloha Inland Resort
Sto. Tomas, Davao del Norte

Sir/Madam:
43

We are the students from the Bukidnon State University, conducting a research
entitled “AUTOMATED HOTEL RESERVATION AND BILLING SYSTEM in
partial fulfillment of the requirements in IT 137- Systems I.

Relative to this, we would like to seek permission from your office to administer
the questionnaire to selected office personnel as respondents of the study.

Your favorable response will contribute to the success of this study and please
be assured that all gathered information would be strictly kept with confidentiality
and for academic purposes only.

May this request merit your approval.

Thank you very much and God Bless.

Sincerely yours,

VERONICA D. ASILO
Group Leader

Noted: Conforme:

JENNYVER B. MONTERAS PRESCILDA L. LUIS


Instructor Manager

CERTIFICATION
44

This is to certify that the BSU-IT Fourth year studentshave personally

appeared before me to conduct an interview, observation and surveyin this

establishment regarding on the development and implementation of their

proposed system entitled “AUTOMATED HOTEL RESERVATION AND BILLING

SYSTEM”.

This certification is being issued to the above-named persons for the

compliance of the said study.

Issued this 20th day of December 10, 2010 at Marscon Sto. Tomas, Davao

del Norte.

PRECILDA LUIS
Manager
45

APPENDIX B

QUESTIONNAIRE

BUKIDNON STATE UNIVERSITY


Sto. Tomas External Studies Center
Sto. Tomas, Davao del Norte
-----------------------------------------------------------------------------------------------------------

ASSESSMENT QUESTIONNAIRE OF THE MANUAL HOTEL RESERVATION


AND BILLING SYSTEM

Name of Evaluator :
Position : EMPLOYEE
Name of Company : ALOHA INLAND RESORT
46

To the Evaluator:Kindly assess the manual hotel reservation and billing system
according to efficiency and accuracy. Refer to the points of equivalent presented
below. A point of 5 – indicates that actions taken in determining the efficiency
and accuracy of the manual system is manifested always. Please check of the
appropriate box for your ratings.
5 Always 3 Sometimes 1 Never
Points of Equivalent
4 Oftentimes 2 Rare
ITEMS 1 2 3 4 5
1. Cost Efficient
2. Fast Data Insertion and Retrieval
3. Time Efficient
4. Accessibility of Records
5. Records Security and Integrity
6. Eliminate Data Redundancy
7. Fast Data Validation
8. Easy Performance Check
9. Reduce Errors
10. Data Accuracy

Remarks:

________________________
Signature Over Printed Name

APPENDIX C
47

VALIDATION OF QUESTIONNAIRE
48
AUTOMATED HOTEL
RESERVATION 49
AND BILLING SYSTEM

APPENDIX D
CUSTOMER
ROOM
DATA FLOW DIAGRAM

CUSTOMER PRINT
CHECK-OUT DEVICE
50

FIRST CUT

CLIENT

FRONT DESK
51

0
Manual Reservation
and Billing

EXPLODED
1
Registration D1 Registration
Request Form
CLIENT

3
Reservation USER
Request

6
Generate
2
Reports
D3Reservation Client
Form Registration
52

AUTOMATED

D2 Client
Reg. Form

5
Billing
Request
4

Billing
Request
D5Billing Request
Form
53

APPENDIX E

ENTITY RELATIONSHIP DIAGRAM

E-R DIAGRAM
54

APPENDIX F

SAMPLE FORMS AND REPORTS


55

APPENDIX F

SAMPLE FORMS AND REPORTS


56

APPENDIX G

SOURCE CODES

Private Sub Form_Load()


Height = 4500
Width = 4850
Top = 0
Left = 2490
End Sub

Private Sub cmdAddnew_Click()


frSearchEngine.Enabled = False
frDatas.Enabled = True
cmdAddnew.Enabled = False
cmdDelete.Enabled = False
cmdEdit.Enabled = False
57

cmdSave.Enabled = True
cmdUpdate.Enabled = False
txtSearchEngine = ""
txtUsername = ""
txtPassword = ""
txtConfirm = ""
txtUsername.SetFocus
End Sub

Private Sub cmdDelete_Click()


If txtUsername = "" Then
MsgBox "No current record to delete!", vbCritical, "Delete Error"
Exit Sub
Else
With Data2.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data2.Recordset.NoMatch = False Then
If MsgBox("You are about to delete " & txtUsername & " in the list. are you
sure?", vbOKCancel + vbInformation, "Confirm Delete") = vbOK Then
Data2.Recordset.Delete
DBGrid1.Refresh
Else
Exit Sub
End If
End If
End If
cmdRefresh_Click
End Sub

Private Sub cmdEdit_Click()


If txtUsername = "" Then
MsgBox "No current record to edit", vbCritical, "Edit Error"
Exit Sub
Else
frSearchEngine.Enabled = False
frDatas.Enabled = True
cmdAddnew.Enabled = False
cmdDelete.Enabled = False
cmdEdit.Enabled = False
cmdSave.Enabled = False
cmdUpdate.Enabled = True
With Data2.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data2.Recordset.NoMatch = False Then
58

With Data2.Recordset
user = .Fields("Username")
End With
End If
txtUsername.SetFocus
End If
End Sub

Private Sub cmdFDUpdate_Click()


If txtFD <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "FamilyDouble"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtFD
End With
Data1.Recordset.Update
End If
txtFD = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtFD = ""
txtFD.SetFocus
Exit Sub
End If
End Sub

Private Sub cmdFTUpdate_Click()


If txtFT <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "FamilyTriple"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtFT
End With
Data1.Recordset.Update
End If
txtFT = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
59

Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtFT = ""
txtFT.SetFocus
Exit Sub
End If
End Sub

Private Sub cmdRefresh_Click()


txtSearchEngine = ""
txtPassword = ""
txtUsername = ""
txtConfirm = ""
cmdAddnew.Enabled = True
cmdEdit.Enabled = True
cmdDelete.Enabled = True
cmdSave.Enabled = False
cmdUpdate.Enabled = False
frSearchEngine.Enabled = True
frDatas.Enabled = False
txtSearchEngine.SetFocus
End Sub

Private Sub cmdSave_Click()


If txtUsername = "" Or txtPassword = "" Or txtConfirm = "" Then
MsgBox "Please fill in the boxes properly!", vbCritical, "Save Error"
txtUsername.SetFocus
Exit Sub
Else
With Data2.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data2.Recordset.NoMatch = True Then
If txtConfirm = txtPassword Then
Data2.Recordset.AddNew
With Data2.Recordset
.Fields("Username") = txtUsername
.Fields("Password") = txtPassword
End With
Data2.Recordset.Update
DBGrid1.Refresh
Else
MsgBox "Confirmed password does not match your password!",
vbCritical, "Save Error"
txtConfirm = ""
txtConfirm.SetFocus
Exit Sub
60

End If
Else
MsgBox "Username already exist!", vbCritical, "Save Error"
txtUsername = ""
txtUsername.SetFocus
Exit Sub
End If
End If
cmdRefresh_Click
End Sub

Private Sub cmdSDUpdate_Click()


If txtSD <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtSD
End With
Data1.Recordset.Update
End If
txtSD = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtSD = ""
txtSD.SetFocus
Exit Sub
End If
End Sub

Private Sub cmdSSUpdate_Click()


If txtSS <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtSS
End With
Data1.Recordset.Update
End If
61

txtSS = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtSS = ""
txtSS.SetFocus
Exit Sub
End If
End Sub

Private Sub cmdVDUpdate_Click()


If txtVD <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtVD
End With
Data1.Recordset.Update
End If
txtVD = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtVD = ""
txtVD.SetFocus
Exit Sub
End If
End Sub

Private Sub cmdVSUpdate_Click()


If txtVS <> 0 Then
With Data1.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data1.Recordset.NoMatch = False Then
Data1.Recordset.Edit
With Data1.Recordset
.Fields("PerDay") = txtVS
End With
Data1.Recordset.Update
End If
62

txtVS = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtVS = ""
txtVS.SetFocus
Exit Sub
End If
End Sub

Private Sub Command1_Click()


frRoomRates.Visible = False
End Sub

Private Sub Command2_Click()


frSecurity.Visible = False
End Sub

Private Sub DBGrid1_Click()


Timer2.Enabled = True
End Sub

Private Sub Form_Load()


Data1.DatabaseName = App.Path + "\" + "Rooms.mdb"
Data1.RecordSource = "Rate"
Data2.DatabaseName = App.Path + "\" + "Admins.mdb"
Data2.RecordSource = "Existing"
If adm = 1 Then
frSecurity.Visible = True
frRoomRates.Visible = False
End If
If adm = 2 Then
frSecurity.Visible = False
frRoomRates.Visible = True
End If
End Sub

Private Sub mExit_Click()


Unload Me
End Sub

Private Sub mRoom_Click()


frSecurity.Visible = False
frRoomRates.Visible = True
End Sub

Private Sub mSystemSec_Click()


63

frSecurity.Visible = True
frRoomRates.Visible = False
End Sub

Private Sub Picture1_Click()

End Sub

Private Sub Timer1_Timer()


With Data1.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtSSO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtSDO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtVSO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtVDO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "FamilyDouble"
64

End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtFDO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "FamilyTriple"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtFTO = .Fields("PerDay")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Timer2_Timer()


On Error GoTo error_2
user = Data2.Recordset.Fields("Username")
txtSearchEngine = user
error_2:
Timer2.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
Case 1
frRoomRates.Visible = False
frSecurity.Visible = True
Case 2
frRoomRates.Visible = True
frSecurity.Visible = False
Case 3
Unload Me
End Select
End Sub

Private Sub txtFD_Change()


If IsNumeric(txtFD) = True Then
cmdFDUpdate.Enabled = True
Else
cmdFDUpdate.Enabled = False
End If
End Sub

Private Sub txtFT_Change()


65

If IsNumeric(txtFT) = True Then


cmdFTUpdate.Enabled = True
Else
cmdFTUpdate.Enabled = False
End If
End Sub

Private Sub txtSD_Change()


If IsNumeric(txtSD) = True Then
cmdSDUpdate.Enabled = True
Else
cmdSDUpdate.Enabled = False
End If
End Sub

Private Sub txtSearchEngine_Change()


With Data2.Recordset
.Index = "seeker"
.Seek ">=", txtSearchEngine
End With
On Error GoTo error_1
With Data2.Recordset
txtUsername = .Fields("Username")
txtPassword = .Fields("Password")
End With
error_1:
End Sub

Private Sub txtSS_Change()


If IsNumeric(txtSS) = True Then
cmdSSUpdate.Enabled = True
Else
cmdSSUpdate.Enabled = False
End If
End Sub

Private Sub txtVD_Change()


If IsNumeric(txtVD) = True Then
cmdVDUpdate.Enabled = True
Else
cmdVDUpdate.Enabled = False
End If
End Sub

Private Sub txtVS_Change()


If IsNumeric(txtVS) = True Then
cmdVSUpdate.Enabled = True
Else
66

cmdVSUpdate.Enabled = False
End If
End Sub

Dim i As Integer
Private Sub Command1_Click()
If txtUsername = "admin" And txtPassword = "admin" Then
i=0
Unload Me
frmAdministrator.Show 1
Else
If txtUsername = "" Or txtPassword = "" Then
MsgBox "Please fill in the boxes!", vbCritical, "Security Error"
txtUsername.SetFocus
Exit Sub
Else
With Data1.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
pass = .Fields("Password")
End With
If txtPassword = pass Then
i=0
Unload Me
frmAdministrator.Show 1
Else
If MsgBox("Invalid password!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtPassword = ""
txtPassword.SetFocus
Exit Sub
Else
i=0
Unload Me
End If
End If
Else
If MsgBox("Invalid username!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtUsername = ""
txtUsername.SetFocus
Exit Sub
Else
i=0
Unload Me
67

End If
End If
End If
End If
End Sub

Private Sub Command2_Click()


Unload Me
End Sub
Private Sub Form_Load()
i=1
Data1.DatabaseName = App.Path + "\" + "Admins.mdb"
Data1.RecordSource = "Existing"
End Sub

Private Sub Form_Unload(Cancel As Integer)


'Set fromadminsecurity = Nothing
Cancel = i
End Sub

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


If KeyCode = 13 Then Command1_Click
If KeyCode = 27 Then Unload Me
End Sub
Private Sub txtUsername_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then Unload Me
End Sub

Private Sub Form_Load()


Top = 750
Left = 2490
Height = 6750
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub Timer1_Timer()


68

'************************* Room 1 ****************************


With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s13 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s13 & "]"
If s13 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s13 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
69

txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s13 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s13 = .Fields("Status")
End With
End If
End If
If s13 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
70

End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s14 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s14 & "]"
If s14 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s14 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
71

cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s14 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s14 = .Fields("Status")
End With
End If
End If
If s14 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
72

End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s15 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s15 & "]"
If s15 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s15 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
73

txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s15 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s15 = .Fields("Status")
End With
End If
End If
If s15 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
74

lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
75

txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o13 = Format(Date, "dd")
With dtStatus1.Recordset
i13 = .Fields("I")
End With
c13 = o13 - i13
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
76

End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c13 = 0 Then
c13 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c13
c13 = c13 * rVD
End If
lblCharge1 = c13
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c13
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c13
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
77

End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
78

End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
79

Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
80

.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o14 = Format(Date, "dd")
With dtStatus2.Recordset
i14 = .Fields("I")
End With
c14 = o14 - i14
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c14 = 0 Then
c14 = rVD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c14
c1 = c14 * rVD
End If
lblCharge2 = c14
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
81

.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c14
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVD
.Fields("Charge") = c14
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
82

.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
83

End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
84

.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
85

End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o15 = Format(Date, "dd")
With dtStatus3.Recordset
i15 = .Fields("I")
End With
c15 = o15 - i15
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c15 = 0 Then
c15 = rVD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c15
c15 = c15 * rVD
End If
lblCharge3 = c15
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c15
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
86

.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVD
.Fields("Charge") = c15
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
87

txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
88

End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub

Private Sub Form_Load()


Top = 750
Left = 2490
Height = 6750
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub Timer1_Timer()


'************************* Room 1 ****************************
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s16 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s16 & "]"
If s16 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
89

txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s16 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s16 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
90

cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s16 = .Fields("Status")
End With
End If
End If
If s16 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s17 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s17 & "]"
If s17 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
91

txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s17 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s17 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
92

txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s17 = .Fields("Status")
End With
End If
End If
If s17 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s18 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s18 & "]"
If s18 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
93

txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s18 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s18 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
94

txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s18 = .Fields("Status")
End With
End If
End If
If s18 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
95

.Seek "=", "16"


End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
96

.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o16 = Format(Date, "dd")
With dtStatus1.Recordset
i16 = .Fields("I")
End With
c16 = o16 - i16
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c16 = 0 Then
c16 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c16
c16 = c16 * rVD
End If
lblCharge1 = c16
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
97

.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c16
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c16
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
98

.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
99

txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
100

.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
101

End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o17 = Format(Date, "dd")
With dtStatus2.Recordset
i17 = .Fields("I")
End With
c17 = o17 - i17
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c17 = 0 Then
c17 = rVD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c17
c1 = c17 * rVD
End If
lblCharge2 = c17
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c17
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
102

.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVD
.Fields("Charge") = c17
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
103

lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
104

End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
105

Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o18 = Format(Date, "dd")
With dtStatus3.Recordset
i18 = .Fields("I")
End With
c18 = o18 - i18
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
106

End With
End If
If c18 = 0 Then
c18 = rVD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c18
c18 = c18 * rVD
End If
lblCharge3 = c18
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c18
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVD
.Fields("Charge") = c18
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
107

Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
108

.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub

Private Sub mAbout_Click()


frmAbout.Show
End Sub

Private Sub mClients_Click()


Unload frmMasterList
frmMasterList.Show
End Sub

Private Sub MDIForm_Load()


adm = 0
Top = 0
Left = 0
109

End Sub
Private Sub mExit_Click()
If MsgBox("You are about to quit this application. Are you sure?", vbOKCancel +
vbInformation, "Confirm Logoff") = vbOK Then
End
Else
Exit Sub
End If
End Sub
Private Sub mFamilyDouble_Click()
Unload frmFamilyDouble
frmFamilyDouble.Show
End Sub
Private Sub mFamilyTriple_Click()
Unload frmFamilyTriple
frmFamilyTriple.Show
End Sub

Private Sub mmaster_Click()


DataReport3.Show
End Sub

Private Sub mroomrate_Click()


DataReport1.Show
End Sub

Private Sub mRoomRates_Click()


adm = 2
frmAdminSecurity.Show 1
End Sub

Private Sub mRoomStat_Click()


Unload frmRooms
frmRooms.Show
End Sub

Private Sub mSecurity_Click()


adm = 1
frmAdminSecurity.Show 1
End Sub

Private Sub mStanDouble_Click()


Unload frmStanDouble
frmStanDouble.Show
End Sub
Private Sub mStanSingle_Click()
Unload frmStanSingle
frmStanSingle.Show
110

End Sub

Private Sub mstatus_Click()


DataReport2.Show
End Sub

Private Sub mVipDouble_Click()


Unload frmVipSingle
frmVipSingle.Show
End Sub
Private Sub mVipSingle_Click()
Unload frmVipDouble
frmVipDouble.Show
End Sub

Private Sub Timer1_Timer()


frmSystemSecurity.Show 1
Timer1.Enabled = False
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
Unload frmStanDouble
Unload frmStanSingle
frmStanSingle.Show
frmStanDouble.Show
Case 2
Unload frmVipSingle
Unload frmVipDouble
frmVipSingle.Show
frmVipDouble.Show
Case 3
Unload frmFamilyDouble
Unload frmFamilyTriple
frmFamilyDouble.Show
frmFamilyTriple.Show
Case 4
Unload frmMasterList
frmMasterList.Show
Case 5
Unload frmRooms
frmRooms.Show
Case 6
adm = 0
frmAdminSecurity.Show 1
Case 7
Unload frmMasterList
frmAbout.Show
111

Case 8
If MsgBox("You are about to quit this application. Are you sure?",
vbOKCancel + vbInformation, "Confirm Logoff") = vbOK Then
End
Else
Exit Sub
End If
End Select
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub DBGrid1_Click()

End Sub

Private Sub Form_Load()


Top = 0
Left = 0
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data1.RecordSource = "Clients"
End Sub

Private Sub Form_Load()


Top = 0
Left = 0
Data1.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.RecordSource = "Rooms"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
Data2.RecordSource = "Rate"
End Sub

Private Sub Timer1_Timer()


With Data1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s1 = .Fields("Status")
End With
If s1 = "A" Then lblSS1 = "Available"
If s1 = "R" Then lblSS1 = "Reserved"
If s1 = "U" Then lblSS1 = "Used"
If s1 = "O" Then lblSS1 = "Available"
112

End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s2 = .Fields("Status")
End With
If s2 = "A" Then lblSS2 = "Available"
If s2 = "R" Then lblSS2 = "Reserved"
If s2 = "U" Then lblSS2 = "Used"
If s2 = "O" Then lblSS2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s3 = .Fields("Status")
End With
If s3 = "A" Then lblSS3 = "Available"
If s3 = "R" Then lblSS3 = "Reserved"
If s3 = "U" Then lblSS3 = "Used"
If s3 = "O" Then lblSS3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s4 = .Fields("Status")
End With
If s4 = "A" Then lblSD1 = "Available"
If s4 = "R" Then lblSD1 = "Reserved"
If s4 = "U" Then lblSD1 = "Used"
If s4 = "O" Then lblSD1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s5 = .Fields("Status")
End With
113

If s5 = "A" Then lblSD2 = "Available"


If s5 = "R" Then lblSD2 = "Reserved"
If s5 = "U" Then lblSD2 = "Used"
If s5 = "O" Then lblSD2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s6 = .Fields("Status")
End With
If s6 = "A" Then lblSD3 = "Available"
If s6 = "R" Then lblSD3 = "Reserved"
If s6 = "U" Then lblSD3 = "Used"
If s6 = "O" Then lblSD3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s7 = .Fields("Status")
End With
If s7 = "A" Then lblVS1 = "Available"
If s7 = "R" Then lblVS1 = "Reserved"
If s7 = "U" Then lblVS1 = "Used"
If s7 = "O" Then lblVS1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s8 = .Fields("Status")
End With
If s8 = "A" Then lblVS2 = "Available"
If s8 = "R" Then lblVS2 = "Reserved"
If s8 = "U" Then lblVS2 = "Used"
If s8 = "O" Then lblVS2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
114

If Data1.Recordset.NoMatch = False Then


With Data1.Recordset
s9 = .Fields("Status")
End With
If s9 = "A" Then lblVS3 = "Available"
If s9 = "R" Then lblVS3 = "Reserved"
If s9 = "U" Then lblVS3 = "Used"
If s9 = "O" Then lblVS3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s10 = .Fields("Status")
End With
If s10 = "A" Then lblVD1 = "Available"
If s10 = "R" Then lblVD1 = "Reserved"
If s10 = "U" Then lblVD1 = "Used"
If s10 = "O" Then lblVD1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s11 = .Fields("Status")
End With
If s11 = "A" Then lblVD2 = "Available"
If s11 = "R" Then lblVD2 = "Reserved"
If s11 = "U" Then lblVD2 = "Used"
If s11 = "O" Then lblVD2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s12 = .Fields("Status")
End With
If s12 = "A" Then lblVD3 = "Available"
If s12 = "R" Then lblVD3 = "Reserved"
If s12 = "U" Then lblVD3 = "Used"
If s12 = "O" Then lblVD3 = "Available"
End If
115

With Data1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s13 = .Fields("Status")
End With
If s13 = "A" Then lblFD1 = "Available"
If s13 = "R" Then lblFD1 = "Reserved"
If s13 = "U" Then lblFD1 = "Used"
If s13 = "O" Then lblFD1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s14 = .Fields("Status")
End With
If s14 = "A" Then lblFD2 = "Available"
If s14 = "R" Then lblFD2 = "Reserved"
If s14 = "U" Then lblFD2 = "Used"
If s14 = "O" Then lblFD2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s15 = .Fields("Status")
End With
If s15 = "A" Then lblFD3 = "Available"
If s15 = "R" Then lblFD3 = "Reserved"
If s15 = "U" Then lblFD3 = "Used"
If s15 = "O" Then lblFD3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s16 = .Fields("Status")
End With
If s16 = "A" Then lblFT1 = "Available"
116

If s16 = "R" Then lblFT1 = "Reserved"


If s16 = "U" Then lblFT1 = "Used"
If s16 = "O" Then lblFT1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s17 = .Fields("Status")
End With
If s17 = "A" Then lblFT2 = "Available"
If s17 = "R" Then lblFT2 = "Reserved"
If s17 = "U" Then lblFT2 = "Used"
If s17 = "O" Then lblFT2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s18 = .Fields("Status")
End With
If s18 = "A" Then lblFT3 = "Available"
If s18 = "R" Then lblFT3 = "Reserved"
If s18 = "U" Then lblFT3 = "Used"
If s18 = "O" Then lblFT3 = "Available"
End If

With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frStanSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frStanDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
117

End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frVipSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frVipDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "FamilyDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frFamilyDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "FamilyTriple"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frFamilyTriple.Caption = "Triple [ " & .Fields("PerDay") & " / Day ]"
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
Case 1
Timer1.Enabled = True
Case 2
Unload Me
End Select
End Sub
118

Private Sub Form_Load()


Height = 6750
Top = 750
Left = 0
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub SSTab1_DblClick()

End Sub

Private Sub Timer1_Timer()


'************************* Room 4 ****************************
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s4 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s4 & "]"
If s4 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
119

txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s4 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s4 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
120

lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s4 = .Fields("Status")
End With
End If
End If
If s4 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 5 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s5 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s5 & "]"
If s5 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
121

cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s5 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s5 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
122

txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s5 = .Fields("Status")
End With
End If
End If
If s5 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 6 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s6 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s6 & "]"
If s6 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
123

txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s6 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s6 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
124

cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s6 = .Fields("Status")
End With
End If
End If
If s6 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
125

If dtStatus1.Recordset.NoMatch = False Then


dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
126

.Fields("I") = Format(Date, "dd")


.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o4 = Format(Date, "dd")
With dtStatus1.Recordset
i4 = .Fields("I")
End With
c4 = o4 - i4
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSD = .Fields("PerDay")
End With
End If
If c4 = 0 Then
c4 = rSD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c4
c4 = c4 * rSD
End If
lblCharge1 = c4
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
127

.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c4
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Standard [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rSD
.Fields("Charge") = c4
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
128

.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
129

txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
130

dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
131

lblDateOut2 = Format(Date, "mmmm dd, yyyy")


o5 = Format(Date, "dd")
With dtStatus2.Recordset
i5 = .Fields("I")
End With
c5 = o5 - i5
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSD = .Fields("PerDay")
End With
End If
If c5 = 0 Then
c5 = rSD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c5
c5 = c5 * rSD
End If
lblCharge2 = c5
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c5
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Standard [Double]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
132

.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rSD
.Fields("Charge") = c5
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
133

lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
134

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
135

With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o6 = Format(Date, "dd")
With dtStatus3.Recordset
i6 = .Fields("I")
End With
c6 = o6 - i6
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSD = .Fields("PerDay")
End With
End If
136

If c6 = 0 Then
c6 = rSD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c6
c6 = c6 * rSD
End If
lblCharge3 = c6
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c6
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Standard [Double]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rSD
.Fields("Charge") = c6
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
137

Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
138

.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Private Sub Form_Load()


Height = 6750
Top = 0
Left = 0
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
139

dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub SSTab1_DblClick()

End Sub

Private Sub Timer1_Timer()


'************************* Room 1 ****************************
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s1 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s1 & "]"
If s1 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s1 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
140

With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s1 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s1 = .Fields("Status")
End With
End If
End If
If s1 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
141

txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s2 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s2 & "]"
If s2 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s2 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
142

frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s2 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s2 = .Fields("Status")
End With
End If
End If
If s2 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
143

txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s3 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s3 & "]"
If s3 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s3 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
144

Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s3 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s3 = .Fields("Status")
End With
End If
End If
If s3 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
145

With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
146

End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
147

If dtStatus1.Recordset.NoMatch = False Then


lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o1 = Format(Date, "dd")
With dtStatus1.Recordset
i1 = .Fields("I")
End With
c1 = o1 - i1
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSS = .Fields("PerDay")
End With
End If
If c1 = 0 Then
c1 = rSS
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c1
c1 = c1 * rSS
End If
lblCharge1 = c1
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c1
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Standard [Single]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
148

.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rSS
.Fields("Charge") = c1
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
149

lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
150

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
151

With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o2 = Format(Date, "dd")
With dtStatus2.Recordset
i2 = .Fields("I")
End With
c2 = o2 - i2
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSS = .Fields("PerDay")
End With
End If
152

If c2 = 0 Then
c2 = rSS
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c2
c2 = c2 * rSS
End If
lblCharge2 = c2
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c2
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Standard [Single]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rSS
.Fields("Charge") = c2
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
153

Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
154

.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
155

.Seek "=", "3"


End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
156

.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o3 = Format(Date, "dd")
With dtStatus3.Recordset
i3 = .Fields("I")
End With
c3 = o3 - i3
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSS = .Fields("PerDay")
End With
End If
If c3 = 0 Then
c3 = rSS
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c3
c3 = c3 * rSS
End If
lblCharge3 = c3
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
157

.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c3
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Standard [Single]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rSS
.Fields("Charge") = c3
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
158

.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
159

txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Dim i As Integer
Private Sub Command1_Click()
If txtUsername = "admin" And txtPassword = "admin" Then
i=0
Unload Me
Else
If txtUsername = "" Or txtPassword = "" Then
MsgBox "Please fill in the boxes!", vbCritical, "Security Error"
txtUsername.SetFocus
Exit Sub
Else
With Data1.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
pass = .Fields("Password")
End With
If txtPassword = pass Then
i=0
Unload Me
Else
If MsgBox("Invalid password!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtPassword = ""
txtPassword.SetFocus
Exit Sub
Else
End
160

End If
End If
Else
If MsgBox("Invalid username!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtUsername = ""
txtUsername.SetFocus
Exit Sub
Else

End
End If
End If
End If
End If
End Sub

Private Sub Command2_Click()


End
End Sub

Private Sub Form_Load()


Data1.DatabaseName = App.Path + "\" + "Admins.mdb"
Data1.RecordSource = "Existing"
i=1
End Sub

Private Sub Form_Unload(Cancel As Integer)


'Set frmSystemSecurity = Nothing
Cancel = i
End Sub

Private Sub Timer2_Timer()


txtUsername.SetFocus
Timer2.Enabled = False
End Sub

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


If KeyCode = 13 Then Command1_Click
If KeyCode = 27 Then End
End Sub
Private Sub txtUsername_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 27 Then End
End Sub

Private Sub Form_Load()


Top = 750
161

Left = 2490
Height = 6750
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub SSTab1_DblClick()

End Sub

Private Sub Timer1_Timer()


'************************* Room 1 ****************************
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s10 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s10 & "]"
If s10 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
162

lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s10 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s10 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s10 = .Fields("Status")
End With
End If
163

End If
If s10 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s11 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s11 & "]"
If s11 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
164

lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s11 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s11 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s11 = .Fields("Status")
End With
165

End If
End If
If s11 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s12 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s12 & "]"
If s12 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
166

lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s12 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s12 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s12 = .Fields("Status")
167

End With
End If
End If
If s12 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
168

.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
169

Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o10 = Format(Date, "dd")
With dtStatus1.Recordset
i10 = .Fields("I")
End With
c10 = o10 - i10
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c10 = 0 Then
c10 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c10
c10 = c10 * rVD
End If
lblCharge1 = c10
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c10
.Fields("Status") = "O"
End With
170

dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "V.I.P. [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c10
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
171

End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
172

lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
173

'***** Check In *****


Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o11 = Format(Date, "dd")
With dtStatus2.Recordset
i11 = .Fields("I")
End With
174

c11 = o11 - i11


With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c11 = 0 Then
c11 = rVD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c11
c1 = c11 * rVD
End If
lblCharge2 = c11
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c11
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "V.I.P. [Double]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVD
.Fields("Charge") = c11
175

End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
176

Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
177

txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
178

lblDateIn3 = Format(Date, "mmmm dd, yyyy")


dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o12 = Format(Date, "dd")
With dtStatus3.Recordset
i12 = .Fields("I")
End With
c12 = o12 - i12
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c12 = 0 Then
c12 = rVD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c12
179

c12 = c12 * rVD


End If
lblCharge3 = c12
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c12
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "V.I.P. [Double]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVD
.Fields("Charge") = c12
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
180

.Seek "=", "12"


End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
181

.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub

Private Sub Form_Load()


Height = 6750
Top = 0
Left = 2490
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub

Private Sub frRoom1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub
182

Private Sub Timer1_Timer()


'************************* Room 1 ****************************
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
s7 = .Fields("Status")
End With
End If
SSTab1.TabCaption(0) = "Room 1" & " [" & s7 & "]"
If s7 = "A" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s7 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
183

txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s7 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s7 = .Fields("Status")
End With
End If
End If
If s7 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
184

lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s8 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s8 & "]"
If s8 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s8 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
185

txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s8 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s8 = .Fields("Status")
End With
End If
End If
If s8 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
186

lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s9 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s9 & "]"
If s9 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s9 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
187

txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s9 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s9 = .Fields("Status")
End With
End If
End If
If s9 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
188

lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
lblDateReserved1 = Format(Date, "mmmm dd, yyyy")
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
189

If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o7 = Format(Date, "dd")
With dtStatus1.Recordset
i7 = .Fields("I")
End With
c7 = o7 - i7
With Data2.Recordset
190

.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c7 = 0 Then
c7 = rVS
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c7
c7 = c7 * rVS
End If
lblCharge1 = c7
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c7
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVS
.Fields("Charge") = c7
End With
Data1.Recordset.Update
191

Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
192

.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
193

MsgBox "Please fill in the form properly", vbInformation, "Form Error"


txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
194

.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o8 = Format(Date, "dd")
With dtStatus2.Recordset
i8 = .Fields("I")
End With
c8 = o8 - i8
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c8 = 0 Then
c8 = rVS
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c8
c8 = c8 * rVS
End If
lblCharge2 = c8
195

dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c8
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVS
.Fields("Charge") = c8
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
196

dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
197

.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
'***** Reserve *****
Case 1
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
198

.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
199

frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o9 = Format(Date, "dd")
With dtStatus3.Recordset
i9 = .Fields("I")
End With
c9 = o9 - i9
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c9 = 0 Then
c9 = rVS
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c9
c9 = c9 * rVS
End If
lblCharge3 = c9
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c9
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
200

Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVS
.Fields("Charge") = c9
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
201

dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
202

End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub

Public i As Integer
Public i1 As Integer
Public i2 As Integer
Public i3 As Integer
Public i4 As Integer
Public i5 As Integer
Public i6 As Integer
Public i7 As Integer
Public i8 As Integer
Public i9 As Integer
Public i10 As Integer
Public i11 As Integer
Public i12 As Integer
Public i13 As Integer
Public i14 As Integer
Public i15 As Integer
Public i16 As Integer
Public i17 As Integer
Public i18 As Integer

Public o1 As Integer
Public o2 As Integer
Public o3 As Integer
Public o4 As Integer
Public o5 As Integer
Public o6 As Integer
Public o7 As Integer
Public o8 As Integer
Public o9 As Integer
Public o10 As Integer
Public o11 As Integer
Public o12 As Integer
Public o13 As Integer
Public o14 As Integer
Public o15 As Integer
Public o16 As Integer
Public o17 As Integer
203

Public o18 As Integer

Public c1 As Currency
Public c2 As Currency
Public c3 As Currency
Public c4 As Currency
Public c5 As Currency
Public c6 As Currency
Public c7 As Currency
Public c8 As Currency
Public c9 As Currency
Public c10 As Currency
Public c11 As Currency
Public c12 As Currency
Public c13 As Currency
Public c14 As Currency
Public c15 As Currency
Public c16 As Currency
Public c17 As Currency
Public c18 As Currency

Public s1 As String
Public s2 As String
Public s3 As String
Public s4 As String
Public s5 As String
Public s6 As String
Public s7 As String
Public s8 As String
Public s9 As String
Public s10 As String
Public s11 As String
Public s12 As String
Public s13 As String
Public s14 As String
Public s15 As String
Public s16 As String
Public s17 As String
Public s18 As String

Public rSS As Currency


Public rSD As Currency
Public rVS As Currency
Public rVD As Currency
Public rFD As Currency
Public rFT As Currency
Public adm As Integer
204

Public user As String


Public pass As String
205

APPENDIXH

DATA DICTIONARY
206

APPENDIX I

TECHNICAL, OPERATIONAL AND ECONOMICAL

FEASIBILITIES

The researchers have conducted economical, technical, and operational

feasibilities to determine the feasibility of the system. The researchers would like

to know whether the system is technically feasible or not.

Technical Feasibility

The technical feasibility is conducted to support the practicality of a

specific technical solution and the availability of technical resource and expertise.

Technically, the proposed system is feasible since both the hardware and

software requirements needed to run the proposed system is already available in


207

the market. Below are the minimum hardware and software specification required

by the proposed system.

Hardware Specification

Intel Core 2 Dou 1.86GHz 12,134.00

17” Monitor 9,546.00

80GB HDD IDE 2,800.00

512MB RAM Memory 3,000.00

FX 550 (Video Card) 3,125.00

DVD/CD Writer & Rewriter 2,110.00

Keyboard 530.00

TOTAL PHP 33, 245.00

Economical Feasibility

The economic feasibility is measured and estimated based on the

financial aspect of the proposed system. The basic resources to consider are the

cost, time of the system study and estimated cost of hardware and cost of

package software / software development.

The proposed system is economically feasible as it does not cost a large

amount of money. The estimated costs of the proposed system are as follows:

Software Developing Cost


208

System Development 37,000.00

Systems Maintenance 800.00

Ink 295.00

Bond Paper 350.00

TOTAL P38,445.00

Operational Feasibility

The researchers proposed system is feasible. Since employees

and the front desk staff of Aloha Inland Resort isa computer literate wherein they

can efficiently and accurately process booking or reservations and billings.


209

APPENDIX J

EXPERT AND USER ACCEPTANCE SHEETS


210

APPENDIX K

INSTALLATION GUIDE

To install the proposed system, please follow the hereunder instructions

ready for reference:

1. Insert the installation disc to the compact disk drive or dvd drive.

2. Locate the set-up.exe and click to start the installation process.


211

3. After successfully clicking the setup.exe, the installation begins.

4. Click the installation button to install the system in your computer.

5. The system shall install necessary files, registries and other

components in your computer. Until all files are successfully installed.

CURRICULUM VITAE

PERSONAL INFORMATION

NAME: LIEZL SURIGAO GERONDIO


DATE OF BIRTH: JANUARY 1, 1991
PLACE OF BIRTH: BOBONGON STO.TOMAS DAVAO DEL NORTE
HOME ADDRESS: PUROK1-D BOBONGON, STO.TOMAS DAVAO DEL NORTE
212

EDUCATIONAL ATTAINMENT

ELEMENTARY: BOBONGON ELEMENTARY SCHOOL


SECONDARY: STO.TOMAS NATIONAL HIGH SCHOOL
TERTIARY: BUKIDNON STATE UNIVERSITY
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

ORGANIZATION AFFILIATION:

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY


*STUDENT BODY ORGANIZATION/ SSC
*CHRONICLERS WEB ORGANIZATION

CURRICULUM VITAE

PERSONAL INFORMATION

NAME: VERONICA DELA TORRE ASILO


DATE OF BIRTH: OCTOBER 2, 1990
PLACE OF BIRTH: TANGLAW B.E DUJALI
HOME ADDRESS: PUROK AB, BLOCK 4 LOT 1, ESTELA HOMES
SUBD. STO.TOMAS DAVAO DEL NORTE
213

EDUCATIONAL ATTAINMENT

ELEMENTARY: MAGWAWA ELEMENTARY SCHOOL


SECONDARY: STO.TOMAS NATIONAL HIGH SCHOOL
TERTIARY: BUKIDNON STATE UNIVERSITY
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

ORGANIZATION AFFILIATION

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY


*STUDENT BODY ORGANIZATION/ SSC
*CHRONICLERS WEB ORGANIZATION

CURRICULUM VITAE

PERSONAL INFORMATION

NAME: CATHERINE BUHAWI GETIGAN


DATE OF BIRTH: OCTUBER 19, 1989
PLACE OF BIRTH: FD. RD#2 TIBAL-OG, STO.TOMAS DAVAO DEL NORTE
HOME ADDRESS: PUROK 6C, FD. RD#2 TIBAL-OG, STO.TOMAS DAVAO DEL NORTE
214

EDUCATIONAL ATTAINMENT

ELEMENTARY: STO.TOMAS ELEMENTARY SCHOOL


SECONDARY: STO.TOMAS NATIONAL HIGH SCHOOL
TERTIARY: BUKIDNON STATE UNIVERSITY
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

ORGANIZATION AFFILIATION

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY


*STUDENT BODY ORGANIZATION/ SSC

CURRICULUM VITAE

PERSONAL INFORMATION

NAME: JENNYLN PURIGAY GUMANOY


DATE OF BIRTH: MAY 21, 1987
PLACE OF BIRTH: PANTARON, STO.TOMAS DAVAO DEL NORTE
HOME ADDRESS: PANTARON, STO.TOMAS DAVAO DEL NORTE
215

EDUCATIONAL ATTAINMENT
ELEMENTARY: PANTARON ELEMENTARY SCHOOL
SECONDARY: KINMAYAN NATIONAL HIGH SCHOOL
TERTIARY: BUKIDNON STATE UNIVERSITY
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

ORGANIZATION AFFILIATION:

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY


*STUDENT BODY ORGANIZATION/ SSC

CURRICULUM VITAE

PERSONAL INFORMATION

NAME: MILYN B. TORRES


DATE OF BIRTH: FEBRUARY 14, 1991
PLACE OF BIRTH: SAYON, SANTA JOSEFA AGUSAN DEL SUR
HOME ADDRESS: PUROK 6 NEW KATIPUNAN, SANTA JOSEFA AGUSAN DEL SUR

EDUCATIONAL ATTAINMENT
216

ELEMENTARY: SAYON ELEMENTARY SCHOOL


STA. JOSEFA, AGUSAN DEL SUR
SECONDARY: STA. JOSEFA NATIONAL HIGH SCHOOL
STA. JOSEFA, AGUSAN DEL SUR
TERTIARY: BUKIDNON STATE UNIVERSITY
STO. TOMAS EXTERNAL STUDIES CENTER
STO. TOMAS DAVAO DEL NORTE
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

ORGANIZATION AFFILIATION:

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY


*STUDENT BODY ORGANIZATION/ SSC

Вам также может понравиться