for final submission

264
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

Upload: lee-gerondio

Post on 31-Mar-2015

71 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: For Final Submission

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.

Page 2: For Final Submission

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.

Page 3: For Final Submission

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

Page 4: For Final Submission

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.

Page 5: For Final Submission

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

Page 6: For Final Submission

6

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

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.1Efficiency

1.2Accuracy?

Page 7: For Final Submission

7

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

assessed in terms of :

2.1 Efficiency

2.2 Accuracy?

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

its operations when analyzed according to:

3.1Efficiency, and

3.2Accuracy?

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

reservation and billing system when analyzed according to:

4.1Efficiency, and

4.2Accuracy?

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.

Page 8: For Final Submission

8

A. RELATED STUDIES

The following literature and studies were considered related to the

presentstudy, hence it was included in this chapter.

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.

Page 9: For Final Submission

9

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

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

Page 10: For Final Submission

10

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

functions for the customers who wishes to avail additional services.

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.

Page 11: For Final Submission

11

B. RELATED LITERATURE

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.

Page 12: For Final Submission

12

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

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.

Page 13: For Final Submission

13

THEORETICAL AND CONCEPTUAL FRAMEWORK

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.

Page 14: For Final Submission

14

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

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

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.

Page 15: For Final Submission

15

Page 16: For Final Submission

16

SIGNIFICANCE OF THE STUDY

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

Page 17: For Final Submission

17

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

of hotel bookings and or accommodations.

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.

Page 18: For Final Submission

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.

Page 19: For Final Submission

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.

Page 20: For Final Submission

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

Page 21: For Final Submission

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.

Page 22: For Final Submission

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.

Page 23: For Final Submission

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.

Page 24: For Final Submission

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?

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

Page 25: For Final Submission

25

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?

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-

Page 26: For Final Submission

26

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.

Page 27: For Final Submission

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.

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.

Page 28: For Final Submission

28

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.

Page 29: For Final Submission

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

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

Page 30: For Final Submission

30

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.

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

Page 31: For Final Submission

31

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 the major decisions about

the system had been integrated.

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

Page 32: For Final Submission

32

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

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

Page 33: For Final Submission

33

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

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

Page 34: For Final Submission

34

identified of the manual transaction system and made as basis for

recommendations for the development of an automated Hotel Reservation and

Billing system.

Page 35: For Final Submission

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.

Page 36: For Final Submission

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.

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.

Page 37: For Final Submission

37

SCREEN SPECIFICATION – OUTPUT

DISCUSSION

SUMMARY

CONCLUSION

RECOMMENDATION

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.

Page 38: For Final Submission

38

FFiF

Figure 2. Room Rates. This form shows the corresponding room rates of

the Hotel. Room Types and rates are shown in the form.

Page 39: For Final Submission

39

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).

Page 40: For Final Submission

40

Page 41: For Final Submission

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

LETTER ASKING PERMISSION AND APPROVAL

TO CONDUCT THE STUDY

Page 42: For Final Submission

42

PERMISSION TO CONDUCT A STUDY

December 10, 2010

PRESCILDA L. LUISManagerAloha Inland ResortSto. Tomas, Davao del Norte

Sir/Madam:

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,

Page 43: For Final Submission

43

VERONICA D. ASILOGroup Leader

Noted: Conforme:

JENNYVER B. MONTERAS PRESCILDA L. LUISInstructor Manager

C E R T I F I C A T I O N

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.

Page 44: For Final Submission

44

PRECILDA LUIS

Manager

APPENDIX B

QUESTIONNAIRE

Page 45: For Final Submission

45

BUKIDNON STATE UNIVERSITYSto. Tomas External Studies Center

Sto. Tomas, Davao del Norte------------------------------------------------------------------------------------------------------------

ASSESSMENT QUESTIONNAIRE OF THE MANUAL HOTEL RESERVATION AND BILLING SYSTEM

Name of Evaluator :Position : EMPLOYEEName of Company : ALOHA INLAND RESORT

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.

Points of Equivalent5 Always 3 Sometimes 1 Never4 Oftentimes 2 Rare

ITEMS 1 2 3 4 51. 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

Page 46: For Final Submission

46

10. Data Accuracy

Remarks:

APPENDIX C

VALIDATION OF QUESTIONNAIRE

________________________Signature Over Printed Name

Page 47: For Final Submission

47

Page 48: For Final Submission

48

APPENDIX D

DATA FLOW DIAGRAM

Page 49: For Final Submission

CUSTOMER

CUSTOMER CHECK-OUT

ROOM

PRINT DEVICE

49AUTOMATED HOTEL

RESERVATIONAND BILLING SYSTEM

Page 50: For Final Submission

50

FIRST CUT

CLIENT

FRONT DESK

0

Manual Reservation and Billing

Page 51: For Final Submission

51

EXPLODED

CLIENT

1

Registration Request

D1 Registration Form

3

Reservation Request

D3Reservation Form

AUTOMATED

6GenerateReports

USER

2

ClientRegistration

D2 Client Reg. Form

5

Billing Request

Page 52: For Final Submission

52

APPENDIX E

ENTITY RELATIONSHIP DIAGRAM

D5Billing Request Form

4

Billing Request

Page 53: For Final Submission

53

E-R DIAGRAM

APPENDIX F

SAMPLE FORMS AND REPORTS

Page 54: For Final Submission

54

APPENDIX F

SAMPLE FORMS AND REPORTS

Page 55: For Final Submission

55

APPENDIX G

SOURCE CODES

Page 56: For Final Submission

56

Private Sub Form_Load()Height = 4500Width = 4850Top = 0Left = 2490End Sub

Private Sub cmdAddnew_Click()frSearchEngine.Enabled = FalsefrDatas.Enabled = TruecmdAddnew.Enabled = FalsecmdDelete.Enabled = FalsecmdEdit.Enabled = FalsecmdSave.Enabled = TruecmdUpdate.Enabled = FalsetxtSearchEngine = ""txtUsername = ""txtPassword = ""txtConfirm = ""txtUsername.SetFocusEnd Sub

Private Sub cmdDelete_Click()If txtUsername = "" Then MsgBox "No current record to delete!", vbCritical, "Delete Error" Exit SubElse With Data2.Recordset

Page 57: For Final Submission

57

.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 IfEnd IfcmdRefresh_ClickEnd Sub

Private Sub cmdEdit_Click()If txtUsername = "" Then MsgBox "No current record to edit", vbCritical, "Edit Error" Exit SubElse 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 With Data2.Recordset user = .Fields("Username") End With End If txtUsername.SetFocusEnd IfEnd Sub

Private Sub cmdFDUpdate_Click()If txtFD <> 0 Then With Data1.Recordset .Index = "seeker" .Seek "=", "FamilyDouble" End With If Data1.Recordset.NoMatch = False Then

Page 58: For Final Submission

58

Data1.Recordset.Edit With Data1.Recordset .Fields("PerDay") = txtFD End With Data1.Recordset.Update End If txtFD = "" Timer1.Enabled = True frmRooms.Timer1.Enabled = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtFD = "" txtFD.SetFocus Exit SubEnd IfEnd 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 = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtFT = "" txtFT.SetFocus Exit SubEnd IfEnd Sub

Private Sub cmdRefresh_Click()txtSearchEngine = ""txtPassword = ""txtUsername = ""txtConfirm = ""cmdAddnew.Enabled = TruecmdEdit.Enabled = True

Page 59: For Final Submission

59

cmdDelete.Enabled = TruecmdSave.Enabled = FalsecmdUpdate.Enabled = FalsefrSearchEngine.Enabled = TruefrDatas.Enabled = FalsetxtSearchEngine.SetFocusEnd 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 SubElse 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 End If Else MsgBox "Username already exist!", vbCritical, "Save Error" txtUsername = "" txtUsername.SetFocus Exit Sub End IfEnd IfcmdRefresh_ClickEnd Sub

Private Sub cmdSDUpdate_Click()If txtSD <> 0 Then With Data1.Recordset .Index = "seeker"

Page 60: For Final Submission

60

.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 = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtSD = "" txtSD.SetFocus Exit SubEnd IfEnd 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 txtSS = "" Timer1.Enabled = True frmRooms.Timer1.Enabled = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtSS = "" txtSS.SetFocus Exit SubEnd IfEnd Sub

Private Sub cmdVDUpdate_Click()If txtVD <> 0 Then With Data1.Recordset .Index = "seeker"

Page 61: For Final Submission

61

.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 = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtVD = "" txtVD.SetFocus Exit SubEnd IfEnd 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 txtVS = "" Timer1.Enabled = True frmRooms.Timer1.Enabled = TrueElse MsgBox "Invalid Entry!", vbCritical, "Update Error" txtVS = "" txtVS.SetFocus Exit SubEnd IfEnd Sub

Private Sub Command1_Click()frRoomRates.Visible = FalseEnd Sub

Page 62: For Final Submission

62

Private Sub Command2_Click()frSecurity.Visible = FalseEnd Sub

Private Sub DBGrid1_Click()Timer2.Enabled = TrueEnd 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 = FalseEnd IfIf adm = 2 Then frSecurity.Visible = False frRoomRates.Visible = TrueEnd IfEnd Sub

Private Sub mExit_Click()Unload MeEnd Sub

Private Sub mRoom_Click()frSecurity.Visible = FalsefrRoomRates.Visible = TrueEnd Sub

Private Sub mSystemSec_Click()frSecurity.Visible = TruefrRoomRates.Visible = FalseEnd Sub

Private Sub Picture1_Click()

End Sub

Private Sub Timer1_Timer()With Data1.Recordset .Index = "seeker" .Seek "=", "StandardSingle"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset

Page 63: For Final Submission

63

txtSSO = .Fields("PerDay") End WithEnd IfWith Data1.Recordset .Index = "seeker" .Seek "=", "StandardDouble"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset txtSDO = .Fields("PerDay") End WithEnd IfWith Data1.Recordset .Index = "seeker" .Seek "=", "VIPSingle"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset txtVSO = .Fields("PerDay") End WithEnd IfWith Data1.Recordset .Index = "seeker" .Seek "=", "VIPDouble"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset txtVDO = .Fields("PerDay") End WithEnd IfWith Data1.Recordset .Index = "seeker" .Seek "=", "FamilyDouble"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset txtFDO = .Fields("PerDay") End WithEnd IfWith Data1.Recordset .Index = "seeker" .Seek "=", "FamilyTriple"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset txtFTO = .Fields("PerDay") End WithEnd If

Page 64: For Final Submission

64

Timer1.Enabled = FalseEnd Sub

Private Sub Timer2_Timer()On Error GoTo error_2user = Data2.Recordset.Fields("Username")txtSearchEngine = usererror_2:Timer2.Enabled = FalseEnd 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 MeEnd SelectEnd Sub

Private Sub txtFD_Change()If IsNumeric(txtFD) = True Then cmdFDUpdate.Enabled = TrueElse cmdFDUpdate.Enabled = FalseEnd IfEnd Sub

Private Sub txtFT_Change()If IsNumeric(txtFT) = True Then cmdFTUpdate.Enabled = TrueElse cmdFTUpdate.Enabled = FalseEnd IfEnd Sub

Private Sub txtSD_Change()If IsNumeric(txtSD) = True Then cmdSDUpdate.Enabled = TrueElse cmdSDUpdate.Enabled = FalseEnd IfEnd Sub

Page 65: For Final Submission

65

Private Sub txtSearchEngine_Change()With Data2.Recordset .Index = "seeker" .Seek ">=", txtSearchEngineEnd WithOn Error GoTo error_1With Data2.Recordset txtUsername = .Fields("Username") txtPassword = .Fields("Password")End Witherror_1:End Sub

Private Sub txtSS_Change()If IsNumeric(txtSS) = True Then cmdSSUpdate.Enabled = TrueElse cmdSSUpdate.Enabled = FalseEnd IfEnd Sub

Private Sub txtVD_Change()If IsNumeric(txtVD) = True Then cmdVDUpdate.Enabled = TrueElse cmdVDUpdate.Enabled = FalseEnd IfEnd Sub

Private Sub txtVS_Change()If IsNumeric(txtVS) = True Then cmdVSUpdate.Enabled = TrueElse cmdVSUpdate.Enabled = FalseEnd IfEnd Sub

Dim i As IntegerPrivate Sub Command1_Click()If txtUsername = "admin" And txtPassword = "admin" Then i = 0 Unload Me frmAdministrator.Show 1Else If txtUsername = "" Or txtPassword = "" Then MsgBox "Please fill in the boxes!", vbCritical, "Security Error" txtUsername.SetFocus Exit Sub

Page 66: For Final Submission

66

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 End If End If End IfEnd IfEnd Sub

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

Page 67: For Final Submission

67

Private Sub Form_Unload(Cancel As Integer)'Set fromadminsecurity = NothingCancel = iEnd Sub

Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)If KeyCode = 13 Then Command1_ClickIf KeyCode = 27 Then Unload MeEnd SubPrivate Sub txtUsername_KeyDown(KeyCode As Integer, Shift As Integer)If KeyCode = 27 Then Unload MeEnd Sub

Private Sub Form_Load()Top = 750Left = 2490Height = 6750SSTab1.Tab = 0dtStatus1.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 "=", "13"End WithIf dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s13 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(0) = "Room 1" & " [" & s13 & "]"If s13 = "A" Then Toolbar1.Buttons(1).Enabled = False Toolbar1.Buttons(2).Enabled = False Toolbar1.Buttons(3).Enabled = False

Page 68: For Final Submission

68

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 WithEnd IfIf 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") txtNationality1 = .Fields("Nationality") lblDateReserved1 = .Fields("DateReserved") End With End IfEnd IfIf 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"

Page 69: For Final Submission

69

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 IfEnd IfIf 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 WithEnd If'************************* Room 2 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "14"End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s14 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(1) = "Room 2" & " [" & s14 & "]"If s14 = "A" Then Toolbar2.Buttons(1).Enabled = False Toolbar2.Buttons(2).Enabled = False

Page 70: For Final Submission

70

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 WithEnd IfIf 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") cmdGender2 = .Fields("Gender") txtNationality2 = .Fields("Nationality") lblDateReserved2 = .Fields("DateReserved") End With End IfEnd IfIf 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"

Page 71: For Final Submission

71

.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 IfEnd IfIf 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") End WithEnd If'************************* Room 3 ****************************With dtStatus3.Recordset .Index = "seeker" .Seek "=", "15"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s15 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(2) = "Room 3" & " [" & s15 & "]"If s15 = "A" Then Toolbar3.Buttons(1).Enabled = False

Page 72: For Final Submission

72

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 WithEnd IfIf 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") txtAge3 = .Fields("Age") cmdGender3 = .Fields("Gender") txtNationality3 = .Fields("Nationality") lblDateReserved3 = .Fields("DateReserved") End With End IfEnd IfIf 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

Page 73: For Final Submission

73

.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 IfEnd IfIf 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") lblCharge3 = .Fields("Charge") End WithEnd IfTimer1.Enabled = FalseEnd 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"

Page 74: For Final Submission

74

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 _ 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

Page 75: For Final Submission

75

.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" 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

Page 76: For Final Submission

76

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 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

Page 77: For Final Submission

77

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" 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") = ""

Page 78: For Final Submission

78

.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 MeEnd SelectEnd SubPrivate 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 "=", "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

Page 79: For Final Submission

79

.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 .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

Page 80: For Final Submission

80

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 .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

Page 81: For Final Submission

81

.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 .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

Page 82: For Final Submission

82

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" 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

Page 83: For Final Submission

83

frmRooms.Timer1.Enabled = True End If '***** Exit ***** Case 6 Unload MeEnd SelectEnd 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 .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

Page 84: For Final Submission

84

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 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

Page 85: For Final Submission

85

.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 .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

Page 86: For Final Submission

86

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 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

Page 87: For Final Submission

87

.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 End If '***** Exit ***** Case 6 Unload Me frmRooms.Timer1.Enabled = TrueEnd SelectEnd Sub

Private Sub Form_Load()Top = 750Left = 2490Height = 6750SSTab1.Tab = 0dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"

Page 88: For Final Submission

88

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 WithIf dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s16 = .Fields("Status") End WithEnd IfSSTab1.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") 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 WithEnd IfIf s16 = "R" Then Toolbar1.Buttons(1).Enabled = False Toolbar1.Buttons(2).Enabled = True Toolbar1.Buttons(3).Enabled = False Toolbar1.Buttons(4).Enabled = False

Page 89: For Final Submission

89

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 IfEnd IfIf 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") cmdGender1 = .Fields("Gender") txtNationality1 = .Fields("Nationality") lblDateReserved1 = .Fields("DateReserved") lblDateIn1 = .Fields("DateIn") s16 = .Fields("Status") End With End IfEnd IfIf 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

Page 90: For Final Submission

90

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 WithEnd If'************************* Room 2 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "17"End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s17 = .Fields("Status") End WithEnd IfSSTab1.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") 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 WithEnd IfIf s17 = "R" Then Toolbar2.Buttons(1).Enabled = False Toolbar2.Buttons(2).Enabled = True Toolbar2.Buttons(3).Enabled = False

Page 91: For Final Submission

91

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 IfEnd IfIf 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") txtAge2 = .Fields("Age") cmdGender2 = .Fields("Gender") txtNationality2 = .Fields("Nationality") lblDateReserved2 = .Fields("DateReserved") lblDateIn2 = .Fields("DateIn") s17 = .Fields("Status") End With End IfEnd IfIf 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

Page 92: For Final Submission

92

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 WithEnd If'************************* Room 3 ****************************With dtStatus3.Recordset .Index = "seeker" .Seek "=", "18"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s18 = .Fields("Status") End WithEnd IfSSTab1.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 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 WithEnd IfIf s18 = "R" Then Toolbar3.Buttons(1).Enabled = False Toolbar3.Buttons(2).Enabled = True

Page 93: For Final Submission

93

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 IfEnd IfIf 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") txtAddress3 = .Fields("Address") txtAge3 = .Fields("Age") cmdGender3 = .Fields("Gender") txtNationality3 = .Fields("Nationality") lblDateReserved3 = .Fields("DateReserved") lblDateIn3 = .Fields("DateIn") s18 = .Fields("Status") End With End IfEnd IfIf s18 = "O" Then Toolbar3.Buttons(1).Enabled = False Toolbar3.Buttons(2).Enabled = False Toolbar3.Buttons(3).Enabled = False Toolbar3.Buttons(4).Enabled = True

Page 94: For Final Submission

94

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 WithEnd IfTimer1.Enabled = FalseEnd 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 "=", "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") = ""

Page 95: For Final Submission

95

.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" .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"

Page 96: For Final Submission

96

.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 .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

Page 97: For Final Submission

97

.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") = "" .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")

Page 98: For Final Submission

98

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") 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

Page 99: For Final Submission

99

End SelectEnd SubPrivate 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" .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

Page 100: For Final Submission

100

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" 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")

Page 101: For Final Submission

101

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 .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

Page 102: For Final Submission

102

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") 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

Page 103: For Final Submission

103

.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 MeEnd SelectEnd 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")

Page 104: For Final Submission

104

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 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

Page 105: For Final Submission

105

.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") 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

Page 106: For Final Submission

106

.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 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") = ""

Page 107: For Final Submission

107

.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 .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

Page 108: For Final Submission

108

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 = TrueEnd SelectEnd Sub

Private Sub mAbout_Click()frmAbout.ShowEnd Sub

Private Sub mClients_Click()Unload frmMasterListfrmMasterList.ShowEnd Sub

Private Sub MDIForm_Load()adm = 0Top = 0Left = 0End SubPrivate Sub mExit_Click()If MsgBox("You are about to quit this application. Are you sure?", vbOKCancel + vbInformation, "Confirm Logoff") = vbOK Then EndElse Exit SubEnd IfEnd SubPrivate Sub mFamilyDouble_Click()Unload frmFamilyDoublefrmFamilyDouble.ShowEnd SubPrivate Sub mFamilyTriple_Click()Unload frmFamilyTriple

Page 109: For Final Submission

109

frmFamilyTriple.ShowEnd Sub

Private Sub mmaster_Click()DataReport3.ShowEnd Sub

Private Sub mroomrate_Click()DataReport1.ShowEnd Sub

Private Sub mRoomRates_Click()adm = 2frmAdminSecurity.Show 1End Sub

Private Sub mRoomStat_Click()Unload frmRoomsfrmRooms.ShowEnd Sub

Private Sub mSecurity_Click()adm = 1frmAdminSecurity.Show 1End Sub

Private Sub mStanDouble_Click()Unload frmStanDoublefrmStanDouble.ShowEnd SubPrivate Sub mStanSingle_Click()Unload frmStanSinglefrmStanSingle.ShowEnd Sub

Private Sub mstatus_Click()DataReport2.ShowEnd Sub

Private Sub mVipDouble_Click()Unload frmVipSinglefrmVipSingle.ShowEnd SubPrivate Sub mVipSingle_Click()Unload frmVipDoublefrmVipDouble.ShowEnd Sub

Page 110: For Final Submission

110

Private Sub Timer1_Timer()frmSystemSecurity.Show 1Timer1.Enabled = FalseEnd SubPrivate 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 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 IfEnd SelectEnd Sub

Private Sub Command2_Click()Unload MeEnd Sub

Page 111: For Final Submission

111

Private Sub DBGrid1_Click()

End Sub

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

Private Sub Form_Load()Top = 0Left = 0Data1.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 WithIf 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"End IfWith Data1.Recordset .Index = "seeker" .Seek "=", "2"End WithIf 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 IfWith Data1.Recordset

Page 112: For Final Submission

112

.Index = "seeker" .Seek "=", "3"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "4"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "5"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset s5 = .Fields("Status") End With 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "6"End WithIf 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"

Page 113: For Final Submission

113

If s6 = "U" Then lblSD3 = "Used" If s6 = "O" Then lblSD3 = "Available"End IfWith Data1.Recordset .Index = "seeker" .Seek "=", "7"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "8"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "9"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "10"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset

Page 114: For Final Submission

114

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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "11"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "12"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "13"End WithIf 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 IfWith Data1.Recordset .Index = "seeker"

Page 115: For Final Submission

115

.Seek "=", "14"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "15"End WithIf 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 IfWith Data1.Recordset .Index = "seeker" .Seek "=", "16"End WithIf Data1.Recordset.NoMatch = False Then With Data1.Recordset s16 = .Fields("Status") End With If s16 = "A" Then lblFT1 = "Available" If s16 = "R" Then lblFT1 = "Reserved" If s16 = "U" Then lblFT1 = "Used" If s16 = "O" Then lblFT1 = "Available"End IfWith Data1.Recordset .Index = "seeker" .Seek "=", "17"End WithIf 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"

Page 116: For Final Submission

116

If s17 = "O" Then lblFT2 = "Available"End IfWith Data1.Recordset .Index = "seeker" .Seek "=", "18"End WithIf 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 WithIf Data2.Recordset.NoMatch = False Then With Data2.Recordset frStanSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfWith Data2.Recordset .Index = "seeker" .Seek "=", "StandardDouble"End WithIf Data2.Recordset.NoMatch = False Then With Data2.Recordset frStanDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfWith Data2.Recordset .Index = "seeker" .Seek "=", "VIPSingle"End WithIf Data2.Recordset.NoMatch = False Then With Data2.Recordset frVipSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfWith Data2.Recordset .Index = "seeker" .Seek "=", "VIPDouble"End WithIf Data2.Recordset.NoMatch = False Then

Page 117: For Final Submission

117

With Data2.Recordset frVipDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfWith Data2.Recordset .Index = "seeker" .Seek "=", "FamilyDouble"End WithIf Data2.Recordset.NoMatch = False Then With Data2.Recordset frFamilyDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfWith Data2.Recordset .Index = "seeker" .Seek "=", "FamilyTriple"End WithIf Data2.Recordset.NoMatch = False Then With Data2.Recordset frFamilyTriple.Caption = "Triple [ " & .Fields("PerDay") & " / Day ]" End WithEnd IfTimer1.Enabled = FalseEnd Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index Case 1 Timer1.Enabled = True Case 2 Unload MeEnd SelectEnd Sub

Private Sub Form_Load()Height = 6750Top = 750Left = 0SSTab1.Tab = 0dtStatus1.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"

Page 118: For Final Submission

118

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 WithIf dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s4 = .Fields("Status") End WithEnd IfSSTab1.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") txtNationality1 = .Fields("Nationality") lblDateReserved1 = .Fields("DateReserved") lblDateIn1 = .Fields("DateIn") lblDateOut1 = .Fields("DateOut") lblCharge1 = .Fields("Charge") lblDaysIncurred1 = .Fields("DaysIncurred") End WithEnd IfIf 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

Page 119: For Final Submission

119

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 IfEnd IfIf 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") lblDateReserved1 = .Fields("DateReserved") lblDateIn1 = .Fields("DateIn") s4 = .Fields("Status") End With End IfEnd IfIf 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")

Page 120: For Final Submission

120

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 WithEnd If'************************* Room 5 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "5"End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s5 = .Fields("Status") End WithEnd IfSSTab1.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") cmdGender2 = .Fields("Gender") txtNationality2 = .Fields("Nationality") lblDateReserved2 = .Fields("DateReserved") lblDateIn2 = .Fields("DateIn") lblDateOut2 = .Fields("DateOut") lblCharge2 = .Fields("Charge") lblDaysIncurred2 = .Fields("DaysIncurred") End WithEnd IfIf 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

Page 121: For Final Submission

121

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 IfEnd IfIf 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") txtNationality2 = .Fields("Nationality") lblDateReserved2 = .Fields("DateReserved") lblDateIn2 = .Fields("DateIn") s5 = .Fields("Status") End With End IfEnd IfIf 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

Page 122: For Final Submission

122

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 WithEnd If'************************* Room 6 ****************************With dtStatus3.Recordset .Index = "seeker" .Seek "=", "6"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s6 = .Fields("Status") End WithEnd IfSSTab1.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") 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 WithEnd IfIf s6 = "R" Then Toolbar3.Buttons(1).Enabled = False Toolbar3.Buttons(2).Enabled = True Toolbar3.Buttons(3).Enabled = False Toolbar3.Buttons(4).Enabled = False

Page 123: For Final Submission

123

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 IfEnd IfIf 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") cmdGender3 = .Fields("Gender") txtNationality3 = .Fields("Nationality") lblDateReserved3 = .Fields("DateReserved") lblDateIn3 = .Fields("DateIn") s6 = .Fields("Status") End With End IfEnd IfIf 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

Page 124: For Final Submission

124

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 WithEnd IfTimer1.Enabled = FalseEnd 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 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") = ""

Page 125: For Final Submission

125

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") = "" .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

Page 126: For Final Submission

126

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 .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

Page 127: For Final Submission

127

.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") = "" .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")

Page 128: For Final Submission

128

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") 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 MeEnd SelectEnd Sub

Page 129: For Final Submission

129

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 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

Page 130: For Final Submission

130

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 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

Page 131: For Final Submission

131

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 .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

Page 132: For Final Submission

132

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") 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") = ""

Page 133: For Final Submission

133

.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 MeEnd SelectEnd 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"

Page 134: For Final Submission

134

.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 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"

Page 135: For Final Submission

135

.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 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

Page 136: For Final Submission

136

.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 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") = ""

Page 137: For Final Submission

137

.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") = "" .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")

Page 138: For Final Submission

138

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 MeEnd SelectEnd Sub

Private Sub Form_Load()Height = 6750Top = 0Left = 0SSTab1.Tab = 0dtStatus1.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 "=", "1"End With

Page 139: For Final Submission

139

If dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s1 = .Fields("Status") End WithEnd IfSSTab1.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 WithEnd IfIf 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 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 IfEnd If

Page 140: For Final Submission

140

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 IfEnd IfIf 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") 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 WithEnd If'************************* Room 2 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "2"

Page 141: For Final Submission

141

End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s2 = .Fields("Status") End WithEnd IfSSTab1.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 WithEnd IfIf 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 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

Page 142: For Final Submission

142

End IfIf 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 IfEnd IfIf 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 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 WithEnd If'************************* Room 3 ****************************With dtStatus3.Recordset .Index = "seeker"

Page 143: For Final Submission

143

.Seek "=", "3"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s3 = .Fields("Status") End WithEnd IfSSTab1.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 WithEnd IfIf s3 = "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 "=", "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

Page 144: For Final Submission

144

End IfEnd IfIf 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 IfEnd IfIf 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 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 WithEnd IfTimer1.Enabled = FalseEnd Sub

Page 145: For Final Submission

145

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") = "" 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

Page 146: For Final Submission

146

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 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

Page 147: For Final Submission

147

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 .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

Page 148: For Final Submission

148

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") 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") = ""

Page 149: For Final Submission

149

.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 MeEnd SelectEnd SubPrivate 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"

Page 150: For Final Submission

150

.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 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"

Page 151: For Final Submission

151

.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 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

Page 152: For Final Submission

152

.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 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") = ""

Page 153: For Final Submission

153

.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") = "" .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")

Page 154: For Final Submission

154

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 MeEnd SelectEnd 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 "=", "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") = ""

Page 155: For Final Submission

155

.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" .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"

Page 156: For Final Submission

156

.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 .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

Page 157: For Final Submission

157

.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") = "" .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")

Page 158: For Final Submission

158

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") 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

Page 159: For Final Submission

159

End SelectEnd Sub

Dim i As IntegerPrivate Sub Command1_Click()If txtUsername = "admin" And txtPassword = "admin" Then i = 0 Unload MeElse 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 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 IfEnd If

Page 160: For Final Submission

160

End Sub

Private Sub Command2_Click()EndEnd Sub

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

Private Sub Form_Unload(Cancel As Integer)'Set frmSystemSecurity = NothingCancel = iEnd Sub

Private Sub Timer2_Timer()txtUsername.SetFocusTimer2.Enabled = FalseEnd Sub

Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)If KeyCode = 13 Then Command1_ClickIf KeyCode = 27 Then EndEnd SubPrivate Sub txtUsername_KeyDown(KeyCode As Integer, Shift As Integer)If KeyCode = 27 Then EndEnd Sub

Private Sub Form_Load()Top = 750Left = 2490Height = 6750SSTab1.Tab = 0dtStatus1.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

Page 161: For Final Submission

161

Private Sub SSTab1_DblClick()

End Sub

Private Sub Timer1_Timer()'************************* Room 1 ****************************With dtStatus1.Recordset .Index = "seeker" .Seek "=", "10"End WithIf dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s10 = .Fields("Status") End WithEnd IfSSTab1.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") lblDaysIncurred1 = .Fields("DaysIncurred") End WithEnd IfIf 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

Page 162: For Final Submission

162

With dtStatus1.Recordset txtName1 = .Fields("Name") txtAddress1 = .Fields("Address") txtAge1 = .Fields("Age") cmdGender1 = .Fields("Gender") txtNationality1 = .Fields("Nationality") lblDateReserved1 = .Fields("DateReserved") End With End IfEnd IfIf 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 IfEnd IfIf 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")

Page 163: For Final Submission

163

lblDateIn1 = .Fields("DateIn") lblDateOut1 = .Fields("DateOut") lblDaysIncurred1 = .Fields("DaysIncurred") lblCharge1 = .Fields("Charge") End WithEnd If'************************* Room 2 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "11"End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s11 = .Fields("Status") End WithEnd IfSSTab1.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") lblCharge2 = .Fields("Charge") lblDaysIncurred2 = .Fields("DaysIncurred") End WithEnd IfIf 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

Page 164: For Final Submission

164

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 IfEnd IfIf 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 End IfEnd IfIf 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")

Page 165: For Final Submission

165

lblDateReserved2 = .Fields("DateReserved") lblDateIn2 = .Fields("DateIn") lblDateOut2 = .Fields("DateOut") lblDaysIncurred2 = .Fields("DaysIncurred") lblCharge2 = .Fields("Charge") End WithEnd If'************************* Room 3 ****************************With dtStatus3.Recordset .Index = "seeker" .Seek "=", "12"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s12 = .Fields("Status") End WithEnd IfSSTab1.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") lblDateOut3 = .Fields("DateOut") lblCharge3 = .Fields("Charge") lblDaysIncurred3 = .Fields("DaysIncurred") End WithEnd IfIf 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"

Page 166: For Final Submission

166

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 IfEnd IfIf 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") End With End IfEnd IfIf 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")

Page 167: For Final Submission

167

txtNationality3 = .Fields("Nationality") lblDateReserved3 = .Fields("DateReserved") lblDateIn3 = .Fields("DateIn") lblDateOut3 = .Fields("DateOut") lblDaysIncurred3 = .Fields("DaysIncurred") lblCharge3 = .Fields("Charge") End WithEnd IfTimer1.Enabled = FalseEnd 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 .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

Page 168: For Final Submission

168

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 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")

Page 169: For Final Submission

169

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 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

Page 170: For Final Submission

170

.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" 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

Page 171: For Final Submission

171

'****** 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") lblCharge1 = .Fields("Charge") End With Timer1.Enabled = True frmRooms.Timer1.Enabled = True End If '***** Exit ***** Case 6 Unload MeEnd SelectEnd SubPrivate Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index '***** Reserve ***** Case 1 If txtName2 = "" Or _

Page 172: For Final Submission

172

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 '***** 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

Page 173: For Final Submission

173

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 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

Page 174: For Final Submission

174

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 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"

Page 175: For Final Submission

175

.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 ***** 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") = ""

Page 176: For Final Submission

176

.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 MeEnd SelectEnd 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 "=", "12" End With If dtStatus3.Recordset.NoMatch = False Then dtStatus3.Recordset.Edit With dtStatus3.Recordset

Page 177: For Final Submission

177

.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 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") = ""

Page 178: For Final Submission

178

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 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

Page 179: For Final Submission

179

.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" .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"

Page 180: For Final Submission

180

.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") = "" .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")

Page 181: For Final Submission

181

lblDateOut3 = .Fields("DateOut") lblDaysIncurred3 = .Fields("DaysIncurred") lblCharge3 = .Fields("Charge") End With Timer1.Enabled = True End If '***** Exit ***** Case 6 Unload Me frmRooms.Timer1.Enabled = TrueEnd SelectEnd Sub

Private Sub Form_Load()Height = 6750Top = 0Left = 2490SSTab1.Tab = 0dtStatus1.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

Private Sub Timer1_Timer()'************************* Room 1 ****************************With dtStatus1.Recordset .Index = "seeker" .Seek "=", "7"End WithIf dtStatus1.Recordset.NoMatch = False Then With dtStatus1.Recordset s7 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(0) = "Room 1" & " [" & s7 & "]"If s7 = "A" Then Toolbar1.Buttons(1).Enabled = False

Page 182: For Final Submission

182

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 WithEnd IfIf 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") txtAge1 = .Fields("Age") cmdGender1 = .Fields("Gender") txtNationality1 = .Fields("Nationality") lblDateReserved1 = .Fields("DateReserved") End With End IfEnd IfIf 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

Page 183: For Final Submission

183

.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 IfEnd IfIf 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") lblCharge1 = .Fields("Charge") End WithEnd If'************************* Room 2 ****************************With dtStatus2.Recordset .Index = "seeker" .Seek "=", "8"End WithIf dtStatus2.Recordset.NoMatch = False Then With dtStatus2.Recordset s8 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(1) = "Room 2" & " [" & s8 & "]"If s8 = "A" Then

Page 184: For Final Submission

184

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 WithEnd IfIf 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") txtAddress2 = .Fields("Address") txtAge2 = .Fields("Age") cmdGender2 = .Fields("Gender") txtNationality2 = .Fields("Nationality") lblDateReserved2 = .Fields("DateReserved") End With End IfEnd IfIf 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

Page 185: For Final Submission

185

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 IfEnd IfIf 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") lblDaysIncurred2 = .Fields("DaysIncurred") lblCharge2 = .Fields("Charge") End WithEnd If'************************* Room 3 ****************************With dtStatus3.Recordset .Index = "seeker" .Seek "=", "9"End WithIf dtStatus3.Recordset.NoMatch = False Then With dtStatus3.Recordset s9 = .Fields("Status") End WithEnd IfSSTab1.TabCaption(2) = "Room 3" & " [" & s9 & "]"

Page 186: For Final Submission

186

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 WithEnd IfIf 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 txtName3 = .Fields("Name") txtAddress3 = .Fields("Address") txtAge3 = .Fields("Age") cmdGender3 = .Fields("Gender") txtNationality3 = .Fields("Nationality") lblDateReserved3 = .Fields("DateReserved") End With End IfEnd IfIf 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

Page 187: For Final Submission

187

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 IfEnd IfIf 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") lblDateOut3 = .Fields("DateOut") lblDaysIncurred3 = .Fields("DaysIncurred") lblCharge3 = .Fields("Charge") End WithEnd IfTimer1.Enabled = FalseEnd Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index '***** Reserve ***** Case 1 If txtName1 = "" Or _ txtAddress1 = "" Or _ txtAge1 = "" Or _

Page 188: For Final Submission

188

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 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

Page 189: For Final Submission

189

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 .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

Page 190: For Final Submission

190

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 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

Page 191: For Final Submission

191

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 "=", "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"

Page 192: For Final Submission

192

.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 MeEnd SelectEnd SubPrivate 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 "=", "8" End With If dtStatus2.Recordset.NoMatch = False Then dtStatus2.Recordset.Edit With dtStatus2.Recordset .Fields("Name") = txtName2 .Fields("Address") = txtAddress2 .Fields("Age") = txtAge2

Page 193: For Final Submission

193

.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 .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

Page 194: For Final Submission

194

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 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

Page 195: For Final Submission

195

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 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

Page 196: For Final Submission

196

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") = "" .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")

Page 197: For Final Submission

197

End With Timer1.Enabled = True frmRooms.Timer1.Enabled = True End If '***** Exit ***** Case 6 Unload MeEnd SelectEnd 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 .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

Page 198: For Final Submission

198

'***** 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 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

Page 199: For Final Submission

199

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 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

Page 200: For Final Submission

200

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 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 *****

Page 201: For Final Submission

201

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") End With Timer1.Enabled = True frmRooms.Timer1.Enabled = True End If '***** Exit ***** Case 6 Unload MeEnd SelectEnd Sub

Public i As IntegerPublic i1 As IntegerPublic i2 As IntegerPublic i3 As Integer

Page 202: For Final Submission

202

Public i4 As IntegerPublic i5 As IntegerPublic i6 As IntegerPublic i7 As IntegerPublic i8 As IntegerPublic i9 As IntegerPublic i10 As IntegerPublic i11 As IntegerPublic i12 As IntegerPublic i13 As IntegerPublic i14 As IntegerPublic i15 As IntegerPublic i16 As IntegerPublic i17 As IntegerPublic i18 As Integer

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

Public c1 As CurrencyPublic c2 As CurrencyPublic c3 As CurrencyPublic c4 As CurrencyPublic c5 As CurrencyPublic c6 As CurrencyPublic c7 As CurrencyPublic c8 As CurrencyPublic c9 As CurrencyPublic c10 As CurrencyPublic c11 As CurrencyPublic c12 As Currency

Page 203: For Final Submission

203

Public c13 As CurrencyPublic c14 As CurrencyPublic c15 As CurrencyPublic c16 As CurrencyPublic c17 As CurrencyPublic c18 As Currency

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

Public rSS As CurrencyPublic rSD As CurrencyPublic rVS As CurrencyPublic rVD As CurrencyPublic rFD As CurrencyPublic rFT As CurrencyPublic adm As IntegerPublic user As StringPublic pass As String

Page 204: For Final Submission

204

APPENDIXH

DATA DICTIONARY

Page 205: For Final Submission

205

APPENDIX I

TECHNICAL, OPERATIONAL AND ECONOMICAL

FEASIBILITIES

Page 206: For Final Submission

206

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

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

Page 207: For Final Submission

207

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

System Development 37,000.00

Systems Maintenance 800.00

Ink 295.00

Bond Paper 350.00

TOTAL P38,445.00

Page 208: For Final Submission

208

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.

APPENDIX J

EXPERT AND USER ACCEPTANCE SHEETS

Page 209: For Final Submission

209

APPENDIX K

INSTALLATION GUIDE

Page 210: For Final Submission

210

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.

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

Page 211: For Final Submission

211

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

EDUCATIONAL ATTAINMENT

ELEMENTARY: BOBONGON ELEMENTARY SCHOOL

SECONDARY: STO.TOMAS NATIONAL HIGH SCHOOL

TERTIARY: BUKIDNON STATE UNIVERSITY

COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

Page 212: For Final Submission

212

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

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

Page 213: For Final Submission

213

*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

EDUCATIONAL ATTAINMENT

ELEMENTARY: STO.TOMAS ELEMENTARY SCHOOL

SECONDARY: STO.TOMAS NATIONAL HIGH SCHOOL

TERTIARY: BUKIDNON STATE UNIVERSITY

COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

Page 214: For Final Submission

214

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

EDUCATIONAL ATTAINMENT

ELEMENTARY: PANTARON ELEMENTARY SCHOOL

SECONDARY: KINMAYAN NATIONAL HIGH SCHOOL

TERTIARY: BUKIDNON STATE UNIVERSITY

COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY

Page 215: For Final Submission

215

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

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

Page 216: For Final Submission

216

ORGANIZATION AFFILIATION:

*KNOWLEDGE ENHANCEMENT IN INFORMATION TECHNOLOGY

*STUDENT BODY ORGANIZATION/ SSC