Академический Документы
Профессиональный Документы
Культура Документы
ABSTRACT
registration system for Aloha Inland Resort in Sto. Tomas, Davao del Norte
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
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
said hotel.
2
CHAPTER 1
INTRODUCTION
the worlds,forbusinessorpleasure.Thisneedofmanhasconsequentlyledto
thedevelopment ofaccommodationfacilities.GrayandLiguori(2003)saidthat“inns’
keepinghasthroughtheagesbeencloselyassociatedwithtravel,alwaysadaptingits
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
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.
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).
Systeminthehospitalityindustrywasfirstintroducedinthe1970but
wasnotconsideredviablebecausetheywereexpensivethatonlylargehotelscouldus
e them. However,bythelate1980s,hotelsofall
arefrontofficesoftwarepackagesdesignedtoassistthefrontoffice
employeesperformfunctionsrelatedtoreservationsmanagement,roomsmanagem
4
ent, guestaccountmanagementandgeneralmanagement(Kasavana,1991).
Walker(2004)explainsthatcentralreservationssystemsareusedforaccurateguestr
noting that hotels have raised their standards to continuously provide best
services and deliver these services fast, accurate and at optimum level.
customers.
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.
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,
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
Since its operation, all business transactions of Aloha Inland Resort are
done manually. The front desk office of the resort uses only manual transaction
system for room recordings, checking in and out, reservation and billing.
However, the front desk office encounters problems using manual system due to
6
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
using Manual Hotel Reservation and Billing System of Aloha Inland Resort in
sales monitoring and the like. This study aims to determine the business
1. What is the extent of manual hotel reservation and billing system when
analyzed according to
1.1 Efficiency
1.2 Accuracy?
assessed in terms of :
2.1 Efficiency
2.2 Accuracy?
7
3. What is the level of manual hotel reservation and billing system in terms of
3.2 Accuracy?
4.2 Accuracy?
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
A. RELATED STUDIES
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,
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
where reservations are originating and Ripplemail allows for further contact with
in the area, Hotel El Mirador was searching for aninternet- based property
was looking to stay hands on with their property from distant locations. With an
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
information. The reservation folio helps provide sound customer service and
enables complete management of any action that could occur within that
reservation.
business travelers, students, local and foreign tourists.As varied as their needs
system that can accommodate the bookings of their customers worldwide. It aims
to speed-up the transaction in real time and served it with efficiency and
accuracy. Through the use of the online reservation and billing, the front desk
officers can virtually check the different rooms in real time. Aside from checking
the availability of the rooms, the system also is embedded with customize
Pan Pacific Manilais the first 5-star hotel in Manila that offers luxury
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.
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
B. RELATED LITERATURE
11
online bookings and empirically test their proposed model with potential lodging
customers. Authors indicate that information completeness and ease of use are
Swisshotel websites over different criteria and conclude that they provide
attributesare found to be the room rates, availability and security of payments (in
Das (2010) reiterated that a payment system is a system for the transfer of
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
service provided by banks and other financial institutions. In the US, they are
backing of modern fiat currencies with government, payment systems are a core
payment for buying and selling goods or services offered through the Internet, or
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.
monitoring. Hence, front desk staff or personnel of Aloha Inland Resort must
accommodate guests with utmost attention and priority and by giving them the
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.
function of the front desk staff or personnel. Reservations are received and
through direct personal contact. It also handles inquiries about room rates and
arrangements.
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
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
quality service. This shall help the resort obtain and maintain accuracy and
integrity in their transactions. This will also benefit students and future
and topic.
DEFINITION OF TERMS
System
automated reservation and billing system that is designed to manage all types
term basis.
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
about the nature of objects and persons and supply facts on which scientific
practices with accepted norms or models. In this study, it presented facts about
Specifically, it described facts regarding the efficiency and accuracy of the said
manual system.
19
Research Subject
The participants of the study are the employees and managers of Aloha
as participants of the study. These employees hold various positions in the resort
Research Instrument
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
Resort.
follows:
Ratings Equivalent
system is oftentimes
manifested.
system is manifested
sometimes.
questionnaire after the respondents answered the questions asked and the
of data.
Mean. this statistical tool was used to compute and determine the
Resort.
23
CHAPTER 3
This form serves as the main entry to the application. Users of this
application shall provide the correct username and password to gain
access.
24
CHAPTER 4
Summary of Findings
The answers of the following questions raised in the first chapter of this
1. What is the extent of manual hotel reservation and billing system when
analyzed according to
a. Efficiency
b. Accuracy?
25
booking and/or registration and of billing system gets an over-all mean of 2.36
assessed in terms of :
a. reservation
b. billing?
with a descriptive equivalent of rare which indicates that the perception of the
respondents’ toward accuracy and efficiency using the manual hotel reservation
3. What is the level of manual hotel reservation and billing system in terms of
a. Efficiency, and
b. Accuracy?
26
all mean of 2.3 with a descriptive equivalent of rare which only indicates
efficiency and accuracy. Hence, with the given figure it suggests that
a. Efficiency, and
b. Accuracy?
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
sometimes accurate.
27
Conclusions
Based on the findings of the study the following conclusions are drawn.
2. The extent of manual hotel reservation and billing system when assessed
the respondents’ toward accuracy and efficiency using the manual hotel
3. The level of manual hotel reservation and billing system in terms of its
accurate.
Recommendations
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
learned that in manual transaction system, the front desk encounters a lot
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
1. Sales Monitoring
2. Room monitoring
SYSTEM ANALYSIS
decisions handled in the manual system. The researchers observed carefully the
front desk personnel. The data gathered at this stage were subjected for
system. The researcher specified the user requirements that will be integrated in
SYSTEM DESIGN
In this stage, the researcher designed the different forms of the proposed
and gathered by the researchers. The researchers carefully designed each form
with the necessary controls and modules that will form part of the automated
Hotel Reservation and Billing System. The computer language used in this
system was the Microsoft Visual Basic 6.0 Professional Edition. The researcher
program codes to form part of the proposed system and t he major decisions about
SYSTEM TESTING
System to detect errors of the system. The front desk personnel were given an
personnel. The researchers observed the front desk personnel and noted the
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
related to its working environment. Some errors found in the system were noted
33
and corrected. Review of the system from time to time was part of the
maintenance activity.
RESEARCH SUBJECT
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
this study:
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
The study was conducted among the front desk personnel of Aloha Inland
34
Resort. On the onset, permission to conduct the study was sought from the
owner of the said inland resort. Once permission was obtained, the researcher
met the front desk personnel to explain the purpose of the study and the
after the interview. The retrieval of questionnaire was done immediately. The
data gathered were then analyzed, compared and interpreted. Weak areas were
Billing system.
35
Figure 2. Room Rates Form. This form serves as the main setting to change
the rates of each room. Users can update, modify and each rate.
Figure 3. Standard Room Single. This form features the standard single
room. Text fields should be filled properly to execute reservation, check-in
and check-out.
36
Figure 4. Family Room Double. This form features the family room double.
Text fields should be filled properly to execute reservation, check-in and
check-out.
37
Figure 5. VIP Room Double. This form features the VIP room double. Text
fields should be filled properly to execute reservation, check-in and check-
out.
DISCUSSION
SUMMARY
CONCLUSION
RECOMMENDATION
38
Figure 1. Client Master Report. This forms shows all the transactions
transpired using the system. It shows the room number, room type, name,
date checked-in and checked-out as well as the corresponding charges.
39
FFiF
Figure 2. Room Rates. This form shows the corresponding room rates of
the Hotel. Room Types and rates are shown in the form.
40
Figure 3. Rooms Master List. This form shows the master list of all rooms
in the hotel. It also shows the status of the room ( available, used and
reserved).
41
Figure 4. Status Report. This form shows the status of the room. It shows
the name of the occupant, the address, the age, date checked-in and date
checked-out including the corresponding charges.
APPENDIX A
42
PRESCILDA L. LUIS
Manager
Aloha Inland Resort
Sto. Tomas, Davao del Norte
Sir/Madam:
43
We are the students from the Bukidnon State University, conducting a research
entitled “AUTOMATED HOTEL RESERVATION AND BILLING SYSTEM in
partial fulfillment of the requirements in IT 137- Systems I.
Relative to this, we would like to seek permission from your office to administer
the questionnaire to selected office personnel as respondents of the study.
Your favorable response will contribute to the success of this study and please
be assured that all gathered information would be strictly kept with confidentiality
and for academic purposes only.
Sincerely yours,
VERONICA D. ASILO
Group Leader
Noted: Conforme:
CERTIFICATION
44
SYSTEM”.
Issued this 20th day of December 10, 2010 at Marscon Sto. Tomas, Davao
del Norte.
PRECILDA LUIS
Manager
45
APPENDIX B
QUESTIONNAIRE
Name of Evaluator :
Position : EMPLOYEE
Name of Company : ALOHA INLAND RESORT
46
To the Evaluator:Kindly assess the manual hotel reservation and billing system
according to efficiency and accuracy. Refer to the points of equivalent presented
below. A point of 5 – indicates that actions taken in determining the efficiency
and accuracy of the manual system is manifested always. Please check of the
appropriate box for your ratings.
5 Always 3 Sometimes 1 Never
Points of Equivalent
4 Oftentimes 2 Rare
ITEMS 1 2 3 4 5
1. Cost Efficient
2. Fast Data Insertion and Retrieval
3. Time Efficient
4. Accessibility of Records
5. Records Security and Integrity
6. Eliminate Data Redundancy
7. Fast Data Validation
8. Easy Performance Check
9. Reduce Errors
10. Data Accuracy
Remarks:
________________________
Signature Over Printed Name
APPENDIX C
47
VALIDATION OF QUESTIONNAIRE
48
AUTOMATED HOTEL
RESERVATION 49
AND BILLING SYSTEM
APPENDIX D
CUSTOMER
ROOM
DATA FLOW DIAGRAM
CUSTOMER PRINT
CHECK-OUT DEVICE
50
FIRST CUT
CLIENT
FRONT DESK
51
0
Manual Reservation
and Billing
EXPLODED
1
Registration D1 Registration
Request Form
CLIENT
3
Reservation USER
Request
6
Generate
2
Reports
D3Reservation Client
Form Registration
52
AUTOMATED
D2 Client
Reg. Form
5
Billing
Request
4
Billing
Request
D5Billing Request
Form
53
APPENDIX E
E-R DIAGRAM
54
APPENDIX F
APPENDIX F
APPENDIX G
SOURCE CODES
cmdSave.Enabled = True
cmdUpdate.Enabled = False
txtSearchEngine = ""
txtUsername = ""
txtPassword = ""
txtConfirm = ""
txtUsername.SetFocus
End Sub
With Data2.Recordset
user = .Fields("Username")
End With
End If
txtUsername.SetFocus
End If
End Sub
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtFT = ""
txtFT.SetFocus
Exit Sub
End If
End Sub
End If
Else
MsgBox "Username already exist!", vbCritical, "Save Error"
txtUsername = ""
txtUsername.SetFocus
Exit Sub
End If
End If
cmdRefresh_Click
End Sub
txtSS = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtSS = ""
txtSS.SetFocus
Exit Sub
End If
End Sub
txtVS = ""
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
Else
MsgBox "Invalid Entry!", vbCritical, "Update Error"
txtVS = ""
txtVS.SetFocus
Exit Sub
End If
End Sub
frSecurity.Visible = True
frRoomRates.Visible = False
End Sub
End Sub
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtFDO = .Fields("PerDay")
End With
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "FamilyTriple"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
txtFTO = .Fields("PerDay")
End With
End If
Timer1.Enabled = False
End Sub
cmdVSUpdate.Enabled = False
End If
End Sub
Dim i As Integer
Private Sub Command1_Click()
If txtUsername = "admin" And txtPassword = "admin" Then
i=0
Unload Me
frmAdministrator.Show 1
Else
If txtUsername = "" Or txtPassword = "" Then
MsgBox "Please fill in the boxes!", vbCritical, "Security Error"
txtUsername.SetFocus
Exit Sub
Else
With Data1.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
pass = .Fields("Password")
End With
If txtPassword = pass Then
i=0
Unload Me
frmAdministrator.Show 1
Else
If MsgBox("Invalid password!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtPassword = ""
txtPassword.SetFocus
Exit Sub
Else
i=0
Unload Me
End If
End If
Else
If MsgBox("Invalid username!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtUsername = ""
txtUsername.SetFocus
Exit Sub
Else
i=0
Unload Me
67
End If
End If
End If
End If
End Sub
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s13 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s13 = .Fields("Status")
End With
End If
End If
If s13 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
70
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s14 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s14 & "]"
If s14 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s14 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
71
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s14 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s14 = .Fields("Status")
End With
End If
End If
If s14 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
72
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s15 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s15 & "]"
If s15 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s15 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
73
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s15 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s15 = .Fields("Status")
End With
End If
End If
If s15 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
74
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o13 = Format(Date, "dd")
With dtStatus1.Recordset
i13 = .Fields("I")
End With
c13 = o13 - i13
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
76
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c13 = 0 Then
c13 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c13
c13 = c13 * rVD
End If
lblCharge1 = c13
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c13
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c13
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
77
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "13"
78
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
79
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
80
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o14 = Format(Date, "dd")
With dtStatus2.Recordset
i14 = .Fields("I")
End With
c14 = o14 - i14
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c14 = 0 Then
c14 = rVD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c14
c1 = c14 * rVD
End If
lblCharge2 = c14
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
81
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c14
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVD
.Fields("Charge") = c14
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
82
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
83
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
85
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o15 = Format(Date, "dd")
With dtStatus3.Recordset
i15 = .Fields("I")
End With
c15 = o15 - i15
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c15 = 0 Then
c15 = rVD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c15
c15 = c15 * rVD
End If
lblCharge3 = c15
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c15
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
86
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Family. [Double]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVD
.Fields("Charge") = c15
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
87
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
88
End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s16 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s16 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
90
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s16 = .Fields("Status")
End With
End If
End If
If s16 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s17 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s17 & "]"
If s17 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
91
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s17 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s17 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
92
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s17 = .Fields("Status")
End With
End If
End If
If s17 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s18 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s18 & "]"
If s18 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
93
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s18 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s18 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
94
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s18 = .Fields("Status")
End With
End If
End If
If s18 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o16 = Format(Date, "dd")
With dtStatus1.Recordset
i16 = .Fields("I")
End With
c16 = o16 - i16
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c16 = 0 Then
c16 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c16
c16 = c16 * rVD
End If
lblCharge1 = c16
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
97
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c16
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c16
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
98
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
99
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
100
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
101
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o17 = Format(Date, "dd")
With dtStatus2.Recordset
i17 = .Fields("I")
End With
c17 = o17 - i17
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c17 = 0 Then
c17 = rVD
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c17
c1 = c17 * rVD
End If
lblCharge2 = c17
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c17
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
102
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVD
.Fields("Charge") = c17
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
103
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "17"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
104
End Sub
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o18 = Format(Date, "dd")
With dtStatus3.Recordset
i18 = .Fields("I")
End With
c18 = o18 - i18
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
106
End With
End If
If c18 = 0 Then
c18 = rVD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c18
c18 = c18 * rVD
End If
lblCharge3 = c18
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c18
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Family [Triple]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVD
.Fields("Charge") = c18
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
107
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "18"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
108
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub
End Sub
Private Sub mExit_Click()
If MsgBox("You are about to quit this application. Are you sure?", vbOKCancel +
vbInformation, "Confirm Logoff") = vbOK Then
End
Else
Exit Sub
End If
End Sub
Private Sub mFamilyDouble_Click()
Unload frmFamilyDouble
frmFamilyDouble.Show
End Sub
Private Sub mFamilyTriple_Click()
Unload frmFamilyTriple
frmFamilyTriple.Show
End Sub
End Sub
Case 8
If MsgBox("You are about to quit this application. Are you sure?",
vbOKCancel + vbInformation, "Confirm Logoff") = vbOK Then
End
Else
Exit Sub
End If
End Select
End Sub
End Sub
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s2 = .Fields("Status")
End With
If s2 = "A" Then lblSS2 = "Available"
If s2 = "R" Then lblSS2 = "Reserved"
If s2 = "U" Then lblSS2 = "Used"
If s2 = "O" Then lblSS2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s3 = .Fields("Status")
End With
If s3 = "A" Then lblSS3 = "Available"
If s3 = "R" Then lblSS3 = "Reserved"
If s3 = "U" Then lblSS3 = "Used"
If s3 = "O" Then lblSS3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s4 = .Fields("Status")
End With
If s4 = "A" Then lblSD1 = "Available"
If s4 = "R" Then lblSD1 = "Reserved"
If s4 = "U" Then lblSD1 = "Used"
If s4 = "O" Then lblSD1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s5 = .Fields("Status")
End With
113
With Data1.Recordset
.Index = "seeker"
.Seek "=", "13"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s13 = .Fields("Status")
End With
If s13 = "A" Then lblFD1 = "Available"
If s13 = "R" Then lblFD1 = "Reserved"
If s13 = "U" Then lblFD1 = "Used"
If s13 = "O" Then lblFD1 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "14"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s14 = .Fields("Status")
End With
If s14 = "A" Then lblFD2 = "Available"
If s14 = "R" Then lblFD2 = "Reserved"
If s14 = "U" Then lblFD2 = "Used"
If s14 = "O" Then lblFD2 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "15"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s15 = .Fields("Status")
End With
If s15 = "A" Then lblFD3 = "Available"
If s15 = "R" Then lblFD3 = "Reserved"
If s15 = "U" Then lblFD3 = "Used"
If s15 = "O" Then lblFD3 = "Available"
End If
With Data1.Recordset
.Index = "seeker"
.Seek "=", "16"
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
s16 = .Fields("Status")
End With
If s16 = "A" Then lblFT1 = "Available"
116
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frStanSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frStanDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
117
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frVipSingle.Caption = "Single [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frVipDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "FamilyDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frFamilyDouble.Caption = "Double [ " & .Fields("PerDay") & " / Day ]"
End With
End If
With Data2.Recordset
.Index = "seeker"
.Seek "=", "FamilyTriple"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
frFamilyTriple.Caption = "Triple [ " & .Fields("PerDay") & " / Day ]"
End With
End If
Timer1.Enabled = False
End Sub
End Sub
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblCharge1 = .Fields("Charge")
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s4 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s4 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
120
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s4 = .Fields("Status")
End With
End If
End If
If s4 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 5 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s5 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s5 & "]"
If s5 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
121
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s5 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s5 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
122
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s5 = .Fields("Status")
End With
End If
End If
If s5 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 6 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s6 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s6 & "]"
If s6 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
123
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s6 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s6 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
124
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s6 = .Fields("Status")
End With
End If
End If
If s6 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c4
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "Standard [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rSD
.Fields("Charge") = c4
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
128
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "4"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
129
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
130
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
131
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rSD
.Fields("Charge") = c5
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
133
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "5"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
134
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o6 = Format(Date, "dd")
With dtStatus3.Recordset
i6 = .Fields("I")
End With
c6 = o6 - i6
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSD = .Fields("PerDay")
End With
End If
136
If c6 = 0 Then
c6 = rSD
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c6
c6 = c6 * rSD
End If
lblCharge3 = c6
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c6
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Standard [Double]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rSD
.Fields("Charge") = c6
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
137
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "6"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
138
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub
End Sub
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s1 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s1 = .Fields("Status")
End With
End If
End If
If s1 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
141
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s2 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s2 & "]"
If s2 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s2 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
142
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s2 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s2 = .Fields("Status")
End With
End If
End If
If s2 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
143
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s3 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s3 & "]"
If s3 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s3 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
144
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s3 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s3 = .Fields("Status")
End With
End If
End If
If s3 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
145
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
147
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rSS
.Fields("Charge") = c1
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
149
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "1"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
150
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateIn2 = Format(Date, "mmmm dd, yyyy")
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o2 = Format(Date, "dd")
With dtStatus2.Recordset
i2 = .Fields("I")
End With
c2 = o2 - i2
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSS = .Fields("PerDay")
End With
End If
152
If c2 = 0 Then
c2 = rSS
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c2
c2 = c2 * rSS
End If
lblCharge2 = c2
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c2
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "Standard [Single]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rSS
.Fields("Charge") = c2
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
153
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "2"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
154
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o3 = Format(Date, "dd")
With dtStatus3.Recordset
i3 = .Fields("I")
End With
c3 = o3 - i3
With Data2.Recordset
.Index = "seeker"
.Seek "=", "StandardSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rSS = .Fields("PerDay")
End With
End If
If c3 = 0 Then
c3 = rSS
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c3
c3 = c3 * rSS
End If
lblCharge3 = c3
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
157
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c3
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "Standard [Single]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rSS
.Fields("Charge") = c3
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
158
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "3"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
159
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Dim i As Integer
Private Sub Command1_Click()
If txtUsername = "admin" And txtPassword = "admin" Then
i=0
Unload Me
Else
If txtUsername = "" Or txtPassword = "" Then
MsgBox "Please fill in the boxes!", vbCritical, "Security Error"
txtUsername.SetFocus
Exit Sub
Else
With Data1.Recordset
.Index = "seeker"
.Seek "=", txtUsername
End With
If Data1.Recordset.NoMatch = False Then
With Data1.Recordset
pass = .Fields("Password")
End With
If txtPassword = pass Then
i=0
Unload Me
Else
If MsgBox("Invalid password!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtPassword = ""
txtPassword.SetFocus
Exit Sub
Else
End
160
End If
End If
Else
If MsgBox("Invalid username!", vbCritical + vbRetryCancel, "Access
Denied") = vbRetry Then
txtUsername = ""
txtUsername.SetFocus
Exit Sub
Else
End
End If
End If
End If
End If
End Sub
Left = 2490
Height = 6750
SSTab1.Tab = 0
dtStatus1.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus2.DatabaseName = App.Path + "\" + "Status.mdb"
dtStatus3.DatabaseName = App.Path + "\" + "Status.mdb"
Data1.DatabaseName = App.Path + "\" + "MasterList.mdb"
Data2.DatabaseName = App.Path + "\" + "Rooms.mdb"
dtStatus1.RecordSource = "Rooms"
dtStatus2.RecordSource = "Rooms"
dtStatus3.RecordSource = "Rooms"
Data1.RecordSource = "Clients"
Data2.RecordSource = "Rate"
End Sub
End Sub
lblDaysIncurred1 = .Fields("DaysIncurred")
End With
End If
If s10 = "R" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s10 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s10 = .Fields("Status")
End With
End If
163
End If
If s10 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s11 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s11 & "]"
If s11 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
164
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s11 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s11 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s11 = .Fields("Status")
End With
165
End If
End If
If s11 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s12 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s12 & "]"
If s12 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
166
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s12 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s12 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s12 = .Fields("Status")
167
End With
End If
End If
If s12 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
169
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o10 = Format(Date, "dd")
With dtStatus1.Recordset
i10 = .Fields("I")
End With
c10 = o10 - i10
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPDouble"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVD = .Fields("PerDay")
End With
End If
If c10 = 0 Then
c10 = rVD
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c10
c10 = c10 * rVD
End If
lblCharge1 = c10
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c10
.Fields("Status") = "O"
End With
170
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "V.I.P. [Double]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVD
.Fields("Charge") = c10
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
171
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "10"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
172
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName2.SetFocus
Exit Sub
Else
lblDateReserved2 = Format(Date, "mmmm dd, yyyy")
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
173
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
176
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "11"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
lblDateReserved3 = Format(Date, "mmmm dd, yyyy")
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "12"
End With
If dtStatus3.Recordset.NoMatch = False Then
178
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
frmRooms.Timer1.Enabled = True
End Select
End Sub
End Sub
182
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
End With
End If
End If
If s7 = "U" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
frRoom1.Enabled = False
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
s7 = .Fields("Status")
End With
End If
End If
If s7 = "O" Then
Toolbar1.Buttons(1).Enabled = False
Toolbar1.Buttons(2).Enabled = False
Toolbar1.Buttons(3).Enabled = False
Toolbar1.Buttons(4).Enabled = True
Toolbar1.Buttons(5).Enabled = False
frRoom1.Enabled = False
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
184
lblCharge1 = .Fields("Charge")
End With
End If
'************************* Room 2 ****************************
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
s8 = .Fields("Status")
End With
End If
SSTab1.TabCaption(1) = "Room 2" & " [" & s8 & "]"
If s8 = "A" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblCharge2 = .Fields("Charge")
lblDaysIncurred2 = .Fields("DaysIncurred")
End With
End If
If s8 = "R" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
185
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
End With
End If
End If
If s8 = "U" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
frRoom2.Enabled = False
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
s8 = .Fields("Status")
End With
End If
End If
If s8 = "O" Then
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar2.Buttons(3).Enabled = False
Toolbar2.Buttons(4).Enabled = True
Toolbar2.Buttons(5).Enabled = False
frRoom2.Enabled = False
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
186
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
End If
'************************* Room 3 ****************************
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
s9 = .Fields("Status")
End With
End If
SSTab1.TabCaption(2) = "Room 3" & " [" & s9 & "]"
If s9 = "A" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblCharge3 = .Fields("Charge")
lblDaysIncurred3 = .Fields("DaysIncurred")
End With
End If
If s9 = "R" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
187
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
End With
End If
End If
If s9 = "U" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
frRoom3.Enabled = False
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
s9 = .Fields("Status")
End With
End If
End If
If s9 = "O" Then
Toolbar3.Buttons(1).Enabled = False
Toolbar3.Buttons(2).Enabled = False
Toolbar3.Buttons(3).Enabled = False
Toolbar3.Buttons(4).Enabled = True
Toolbar3.Buttons(5).Enabled = False
frRoom3.Enabled = False
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
188
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
End With
End If
Timer1.Enabled = False
End Sub
If txtName1 = "" Or _
txtAddress1 = "" Or _
txtAge1 = "" Or _
txtNationality1 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName1.SetFocus
Exit Sub
Else
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateIn1 = Format(Date, "mmmm dd, yyyy")
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("Gender") = cmdGender1
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
lblDateOut1 = Format(Date, "mmmm dd, yyyy")
o7 = Format(Date, "dd")
With dtStatus1.Recordset
i7 = .Fields("I")
End With
c7 = o7 - i7
With Data2.Recordset
190
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c7 = 0 Then
c7 = rVS
lblDaysIncurred1 = 1
Else
lblDaysIncurred1 = c7
c7 = c7 * rVS
End If
lblCharge1 = c7
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("Charge") = c7
.Fields("Status") = "O"
End With
dtStatus1.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "1"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName1
.Fields("Address") = txtAddress1
.Fields("Age") = txtAge1
.Fields("Gender") = cmdGender1
.Fields("Nationality") = txtNationality1
.Fields("DateReserved") = lblDateReserved1
.Fields("DateIn") = lblDateIn1
.Fields("DateOut") = lblDateOut1
.Fields("DaysIncurred") = lblDaysIncurred1
.Fields("RatePerDay") = rVS
.Fields("Charge") = c7
End With
Data1.Recordset.Update
191
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom1.Enabled = True
Toolbar1.Buttons(1).Enabled = True
Toolbar1.Buttons(2).Enabled = True
Toolbar1.Buttons(4).Enabled = False
Toolbar1.Buttons(5).Enabled = True
txtName1.SetFocus
With dtStatus1.Recordset
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = ""
lblCharge1 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus1.Recordset
192
.Index = "seeker"
.Seek "=", "7"
End With
If dtStatus1.Recordset.NoMatch = False Then
dtStatus1.Recordset.Edit
With dtStatus1.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus1.Recordset.Update
With dtStatus1.Recordset
txtName1 = .Fields("Name")
txtAddress1 = .Fields("Address")
txtAge1 = .Fields("Age")
cmdGender1 = .Fields("Gender")
txtNationality1 = .Fields("Nationality")
lblDateReserved1 = .Fields("DateReserved")
lblDateIn1 = .Fields("DateIn")
lblDateOut1 = .Fields("DateOut")
lblDaysIncurred1 = .Fields("DaysIncurred")
lblCharge1 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
'***** Reserve *****
Case 1
If txtName2 = "" Or _
txtAddress2 = "" Or _
txtAge2 = "" Or _
txtNationality2 = "" Then
193
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("Gender") = cmdGender2
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus2.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
lblDateOut2 = Format(Date, "mmmm dd, yyyy")
o8 = Format(Date, "dd")
With dtStatus2.Recordset
i8 = .Fields("I")
End With
c8 = o8 - i8
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c8 = 0 Then
c8 = rVS
lblDaysIncurred2 = 1
Else
lblDaysIncurred2 = c8
c8 = c8 * rVS
End If
lblCharge2 = c8
195
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("Charge") = c8
.Fields("Status") = "O"
End With
dtStatus2.Recordset.Update
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "2"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName2
.Fields("Address") = txtAddress2
.Fields("Age") = txtAge2
.Fields("Gender") = cmdGender2
.Fields("Nationality") = txtNationality2
.Fields("DateReserved") = lblDateReserved2
.Fields("DateIn") = lblDateIn2
.Fields("DateOut") = lblDateOut2
.Fields("DaysIncurred") = lblDaysIncurred2
.Fields("RatePerDay") = rVS
.Fields("Charge") = c8
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom2.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
Toolbar2.Buttons(4).Enabled = False
Toolbar2.Buttons(5).Enabled = True
txtName2.SetFocus
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
196
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = ""
lblCharge2 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus2.Recordset
.Index = "seeker"
.Seek "=", "8"
End With
If dtStatus2.Recordset.NoMatch = False Then
dtStatus2.Recordset.Edit
With dtStatus2.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
197
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus2.Recordset.Update
With dtStatus2.Recordset
txtName2 = .Fields("Name")
txtAddress2 = .Fields("Address")
txtAge2 = .Fields("Age")
cmdGender2 = .Fields("Gender")
txtNationality2 = .Fields("Nationality")
lblDateReserved2 = .Fields("DateReserved")
lblDateIn2 = .Fields("DateIn")
lblDateOut2 = .Fields("DateOut")
lblDaysIncurred2 = .Fields("DaysIncurred")
lblCharge2 = .Fields("Charge")
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "R"
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("I") = ""
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check In *****
Case 2
If txtName3 = "" Or _
txtAddress3 = "" Or _
txtAge3 = "" Or _
txtNationality3 = "" Then
MsgBox "Please fill in the form properly", vbInformation, "Form Error"
txtName3.SetFocus
Exit Sub
Else
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateIn3 = Format(Date, "mmmm dd, yyyy")
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("Gender") = cmdGender3
.Fields("Status") = "U"
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = ""
.Fields("I") = Format(Date, "dd")
.Fields("Charge") = "0.0"
.Fields("DaysIncurred") = ""
End With
dtStatus3.Recordset.Update
Timer1.Enabled = True
199
frmRooms.Timer1.Enabled = True
End If
End If
'***** Check Out *****
Case 3
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
lblDateOut3 = Format(Date, "mmmm dd, yyyy")
o9 = Format(Date, "dd")
With dtStatus3.Recordset
i9 = .Fields("I")
End With
c9 = o9 - i9
With Data2.Recordset
.Index = "seeker"
.Seek "=", "VIPSingle"
End With
If Data2.Recordset.NoMatch = False Then
With Data2.Recordset
rVS = .Fields("PerDay")
End With
End If
If c9 = 0 Then
c9 = rVS
lblDaysIncurred3 = 1
Else
lblDaysIncurred3 = c9
c9 = c9 * rVS
End If
lblCharge3 = c9
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("Charge") = c9
.Fields("Status") = "O"
End With
dtStatus3.Recordset.Update
200
Data1.Recordset.AddNew
With Data1.Recordset
.Fields("RoomNUmber") = "3"
.Fields("RoomType") = "V.I.P. [Single]"
.Fields("Name") = txtName3
.Fields("Address") = txtAddress3
.Fields("Age") = txtAge3
.Fields("Gender") = cmdGender3
.Fields("Nationality") = txtNationality3
.Fields("DateReserved") = lblDateReserved3
.Fields("DateIn") = lblDateIn3
.Fields("DateOut") = lblDateOut3
.Fields("DaysIncurred") = lblDaysIncurred3
.Fields("RatePerDay") = rVS
.Fields("Charge") = c9
End With
Data1.Recordset.Update
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** New *****
Case 4
frRoom3.Enabled = True
Toolbar3.Buttons(1).Enabled = True
Toolbar3.Buttons(2).Enabled = True
Toolbar3.Buttons(4).Enabled = False
Toolbar3.Buttons(5).Enabled = True
txtName3.SetFocus
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("DateOut") = ""
.Fields("DaysIncurred") = ""
.Fields("Charge") = "0.0"
.Fields("I") = ""
.Fields("Status") = "A"
End With
201
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = ""
lblCharge3 = .Fields("Charge")
End With
End If
'****** Cancel *****
Case 5
With dtStatus3.Recordset
.Index = "seeker"
.Seek "=", "9"
End With
If dtStatus3.Recordset.NoMatch = False Then
dtStatus3.Recordset.Edit
With dtStatus3.Recordset
.Fields("Name") = ""
.Fields("Address") = ""
.Fields("Age") = ""
.Fields("Gender") = "Male"
.Fields("Nationality") = ""
.Fields("DateReserved") = ""
.Fields("DateIn") = ""
.Fields("I") = ""
.Fields("Status") = "A"
.Fields("DaysIncurred") = ""
.Fields("DateOut") = ""
.Fields("Charge") = "0.0"
End With
dtStatus3.Recordset.Update
With dtStatus3.Recordset
txtName3 = .Fields("Name")
txtAddress3 = .Fields("Address")
txtAge3 = .Fields("Age")
cmdGender3 = .Fields("Gender")
txtNationality3 = .Fields("Nationality")
lblDateReserved3 = .Fields("DateReserved")
lblDateIn3 = .Fields("DateIn")
lblDateOut3 = .Fields("DateOut")
lblDaysIncurred3 = .Fields("DaysIncurred")
lblCharge3 = .Fields("Charge")
202
End With
Timer1.Enabled = True
frmRooms.Timer1.Enabled = True
End If
'***** Exit *****
Case 6
Unload Me
End Select
End Sub
Public i As Integer
Public i1 As Integer
Public i2 As Integer
Public i3 As Integer
Public i4 As Integer
Public i5 As Integer
Public i6 As Integer
Public i7 As Integer
Public i8 As Integer
Public i9 As Integer
Public i10 As Integer
Public i11 As Integer
Public i12 As Integer
Public i13 As Integer
Public i14 As Integer
Public i15 As Integer
Public i16 As Integer
Public i17 As Integer
Public i18 As Integer
Public o1 As Integer
Public o2 As Integer
Public o3 As Integer
Public o4 As Integer
Public o5 As Integer
Public o6 As Integer
Public o7 As Integer
Public o8 As Integer
Public o9 As Integer
Public o10 As Integer
Public o11 As Integer
Public o12 As Integer
Public o13 As Integer
Public o14 As Integer
Public o15 As Integer
Public o16 As Integer
Public o17 As Integer
203
Public c1 As Currency
Public c2 As Currency
Public c3 As Currency
Public c4 As Currency
Public c5 As Currency
Public c6 As Currency
Public c7 As Currency
Public c8 As Currency
Public c9 As Currency
Public c10 As Currency
Public c11 As Currency
Public c12 As Currency
Public c13 As Currency
Public c14 As Currency
Public c15 As Currency
Public c16 As Currency
Public c17 As Currency
Public c18 As Currency
Public s1 As String
Public s2 As String
Public s3 As String
Public s4 As String
Public s5 As String
Public s6 As String
Public s7 As String
Public s8 As String
Public s9 As String
Public s10 As String
Public s11 As String
Public s12 As String
Public s13 As String
Public s14 As String
Public s15 As String
Public s16 As String
Public s17 As String
Public s18 As String
APPENDIXH
DATA DICTIONARY
206
APPENDIX I
FEASIBILITIES
feasibilities to determine the feasibility of the system. The researchers would like
Technical Feasibility
specific technical solution and the availability of technical resource and expertise.
Technically, the proposed system is feasible since both the hardware and
the market. Below are the minimum hardware and software specification required
Hardware Specification
Keyboard 530.00
Economical Feasibility
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
amount of money. The estimated costs of the proposed system are as follows:
Ink 295.00
TOTAL P38,445.00
Operational Feasibility
and the front desk staff of Aloha Inland Resort isa computer literate wherein they
APPENDIX J
APPENDIX K
INSTALLATION GUIDE
1. Insert the installation disc to the compact disk drive or dvd drive.
CURRICULUM VITAE
PERSONAL INFORMATION
EDUCATIONAL ATTAINMENT
ORGANIZATION AFFILIATION:
CURRICULUM VITAE
PERSONAL INFORMATION
EDUCATIONAL ATTAINMENT
ORGANIZATION AFFILIATION
CURRICULUM VITAE
PERSONAL INFORMATION
EDUCATIONAL ATTAINMENT
ORGANIZATION AFFILIATION
CURRICULUM VITAE
PERSONAL INFORMATION
EDUCATIONAL ATTAINMENT
ELEMENTARY: PANTARON ELEMENTARY SCHOOL
SECONDARY: KINMAYAN NATIONAL HIGH SCHOOL
TERTIARY: BUKIDNON STATE UNIVERSITY
COURSE: BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY
ORGANIZATION AFFILIATION:
CURRICULUM VITAE
PERSONAL INFORMATION
EDUCATIONAL ATTAINMENT
216
ORGANIZATION AFFILIATION: