80
Jameson Inn, Inc. CIS 3210 Group Project By: Alex Kitchin Jigna Patidar Lamia Abdennadher AJ Chhabra Andrerica Moody

Jameson Inn, Inc

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Jameson Inn, Inc

Jameson Inn, Inc.

CIS 3210

Group Project

By: Alex Kitchin Jigna Patidar

Lamia Abdennadher AJ Chhabra

Andrerica Moody

Page 2: Jameson Inn, Inc

2

Table Of Contents

Executive Summay .........................................................................................3 Client Introduction…………………………………………………………….3 Company Background Information………………………………………..3

Current Problems…………………………………………………………….4 Project Problems………………………………………………………………5 Client Application Requirements………………………………………………………………..6 Application Design…………………………………………………………………….7 Components…………………………………………………………………..7 Database Design……………………………………………………………..7 Visual Basic Design………………………………………………………..8 Using the Application……………………………………………..8 User’s Guide…………………………………………………………………12 Summary Future Enhancements…………………………………….21

Reasons for further development………………………………….21 Market Summary …………………………………………….24 Financial Values………………………………………………24

Appendix……………………………………………………………………………25

Page 3: Jameson Inn, Inc

3

Executive Summary Our client is Kitchin Hospitality, LLC. Kitchin Hospitality’s primary business is the construction, marketing and management of all hotels owned by Jameson Inns Inc. Jameson Inns Inc. owns over 125 limited service hotels in the southeast and Midwestern United States. Our primary contact is Greg Winey, Vice President of Operations for Kitchin Hospitality. Alex is currently employed by this company, and he was asked by his manager to help implement a simple solution that would help streamline certain related processes. Mr. Winey has requested an application that would allow Kitchin Hospitality to combine various performance appraisal measures. The first generation of this application will serve to allow an electronic collection of hotel inspection surveys conducted by various field operations managers. These surveys are designed to evaluate a specific set of attributes that are considered core to the company’s values and vision. The application will also serve as a means of producing a first generation “Scorecard”. These scorecards will be a graphical representation of a hotels performance, over time, based on the inspection surveys. The second generation of scorecards will combine all inspection surveys into gross averages and display it as a single value for a hotel, or group of hotels. Also, other performance measures will be condensed, in a similar manner, and displayed as a new set of performance measures, and displayed in the same graphical format as the individual inspection reports. Other performance measures include such things as financial information, Star Reports that detail market share information for specific hotel markets, (Name of survey company hired by Kitchin Hospitality) that calls Jameson Inn guests while they are staying in the hotels in order to gauge customer service, and other possible performance measures in the future. It should be noted this is first generation work. However, the application and its supporting database were designed so that additional generations of them will be easily developed. Kitchin Hospitality, LLC owns and manages hotels in 14 different states under two different flags, Jameson Inns and Signature Inns. Jameson Inns are colonial-style, limited service hotel properties in the Southeast. Signature Inns are larger,limited service hotel properties primarily in the Midwest. Jameson Inns, Inc. has approximately 125 combined operating Inns and approximately 8,400 rooms in 14 states. The Inns are leased to and operated by Kitchin Hospitality LLC. Since 1988 Kitchin Hospitality, LLC, has operated and managed the growth of 130+ Hotel Properties of REIT Jameson Inn, Inc.

Page 4: Jameson Inn, Inc

4

Figure 1. Shows Name of the states each property is in, Number of rooms, and Percent of Portfolio. Hotel Location Number of Properties Size of Hotel (rooms) Percent of Portfolio (%)

Alabama 18 915 14.63 Florida 6 390 4.88

Georgia 28 1,468 22.76 Iowa 1 119 .81

Illinois 3 372 2.44 Indiana 14 1,594 11.38

Kentucky 4 430 3.25 Louisiana 2 146 1.63

Mississippi 6 351 4.88 North Carolina 14 675 11.38

Ohio 3 380 2.44 South Carolina 10 534 8.13

Tennessee 12 760 9.76 Virginia 2 122 1.63

Total 123 8,256 100.0 1 Middle level managers are required to visit the various properties on a regular basis. Part of the visit involves doing a survey on the property for certain corporate specified benchmarks. The surveys are completed manually by the managers while they are visiting the properties. They then have to compile the information into a standard Excel format, and email it to the corporate head office. At the corporate head office, the Excel worksheets are entered into a master worksheet from which reports are generated.

Current Problems • Manual duplication of work at Manager and Corporate Level • Manual Entry • Unable to generate Reports/Surveys in a timely manner • Lack of a clean user interface

Projected Solutions

• Ability to enter information only once • Friendly User Interface

1 www.jamesoninn.com

Page 5: Jameson Inn, Inc

5

• Use information [employee ID, property ID] from the corporate database for ensuring information integrity

• Generating surveys • Generate Scorecard Reports

• Scorecards are a graphical representation a number of inspection reports for any given hotel. Those inspection reports are averaged and display graphically how that hotel has performed over time.

• Limited Budget • Windows and Microsoft Office Suite is Available • No additional software is required • Application does not need to scale to large users as it is being used by single users

We propose to implement a solution with Visual Basic and Microsoft Access. The users will be able to enter information into the database using a number of Visual Basic forms that connect to an Access database. They will then have the option to query the database to generate reports. Currently, the managers will be able to write out the database to a comma-separated-file file and emailed to the Corporate DBA to upload the data into the table.

Page 6: Jameson Inn, Inc

6

Client Application Requirements

Kitchin Hospitality has a variety of performance measures that could be used to evaluate Inns on a number of different areas such as customer service, hotel operating statement categories, employee attrition, and market share just to name a few. Currently, these performance measures hold very little value for Kitchin Hospitality. This is true for two main reasons. First, these measures are insignificant individually. Currently there is no convenient method for compiling the various measures into meaning reports that can be used to formulate comprehensive snapshots of hotel performance. The second reason these measures hold little value for Kitchin Hospitality, is due to the lack of use. In ther words, because these measures are not currently apart of the day-to-day operations of company managers, they are not familiar with their usefulness and meaning. Also, individual managers of hotels do not have a useful way to review their performances and thus cannot use those measures to effectively improve their performance. For these performance measures to have meaning, the client is requiring that the measurement reports share a consistent graphical layout, and a friendly user-interface. So while the measurement criterial will change from report to report, the look and feel will remain the same. This is important so that everyone in the company will develop a common understanding of the information that is presented and its meaning. The graphical reports are to represent individual hotels and groups of hotels over time. The values for each performance measurement’s criteria will be averaged on a four point scale. A score of four represents the best score possible, and one being the worst. Further, every value needs to be assigned a color. Preferably, four is assigned the color green, three assigned the color blue, two assigned the color yellow, and a one is assigned the color red, to stay consistent with the pattern used. Since these reports represent hotels over time, the color-coding will make it easier to identify patterns in performance. This will go a long way toward improving the value that Kitchin Hospitality puts forth towards these measures. This client is requiring that the application accurately provides dependable information pertaining to surveys generated by various managers. Eventually, sooner rather than later, Mr. Winey wants all the managers, regional managers and district managers to have the Scorecard application installed on their personal computers. Additionally, he would like for this to be an automatic startup application, so that managers can view their respective scorecards at the beginning of each day. As a result, employees will be quickly familiarized with the performance measures and standards. We have noted this as a future enhancement. Our client also originally wanted the data generated, to be exported to an excel file for viewing, dispersing needs and other uses. Unfortunately we informed our client that this function would too not be possible due to time allotted to submit the application, as well as the fact that this topic is not covered in this scope of the course.

Page 7: Jameson Inn, Inc

7

Application Design Components

• Microsoft Access Database (Jamesonhotel.mdb)

• Visual Basic Application (JamesonSurvey.exe) Database Design

The database option was the chosen as the most efficient design because it provides an easy capability to store and upload information for viewing and querying purposes. Database design is most essential when designing the initial layout of the information systems. A number of tables were created in the database, which prevent the entrance of duplicate or irrelevant data. The application database design consists of six tables. Apart from the Survey table, all other tables will be maintained and updated at the corporate level. These tables provide all of the necessary information needed to update various sectors of the Jameson Inn Survey Application.

Page 8: Jameson Inn, Inc

8

Visual Basic Design This application consists of four forms that require a user interface of inputs and clicks to generate action and outputs. Command buttons, text boxes, picture boxes, and combo boxes were used to create a familiar, and friendly user interface for users. High consideration was given to the choice of these controls, our final decisions were made on the basis of our current knowledge of Visual Basic, as well as user competency. We also kept in mind that our client requested most importantly a friendly user interface for its users. Below this document describes how this application works and how the end user will interact with the program in the most sequential way. Using the Application In order to use the application, the user must be a Jameson Inn employee, as well as have an authorized employee ID. Access is only granted to the employee only after the employee enters his/her ID in the login box on the login screen of the application. Upon entering the employee ID, the Selection screen is displayed for the user to choose either to view a report or generate a new survey report. Once the option is chosen, either the Survey, or the Survey Reports screen will be displayed. Once the application is loaded and executed, the user will view the first screen and be prompted to login. Login Screen

The login screen (first screen) is simply prompts the user to enter their employee ID. The screen is displayed for the user should enter their employee ID, which will be verified by the application that it is an existing and authorized ID. If the ID is existing and verified, then the second screen will be displayed. In case that the ID cannot be verified as existing or is unauthorized the user will be prompted to re-enter their identification. Moreover, the user can exit the application from the first form by simply clicking on the exit button.

Page 9: Jameson Inn, Inc

9

Valid Employee ID Information Employee ID Employee Name 111111110 Jose Cabrara 111111111 John Smith 111111112 Matt Bartles 111111113 Ginger Howard 111111114 Cindy Smith 111111115 Jonathan Smith 111111116 Greg Maness 111111117 Tony Winey 111111118 Susan Alexander 111111119 Misty Waters Once the user has entered a valid employee ID, the user will be navigated to the Selection Screen to choose an option. Selection Screen

The role of the Selection screen (second screen), is to present the user with a choice to either view an existing survey report, or to create a new survey report. By choosing (clicking on the button) one of these options, the proper screen is then loaded and displayed for the user. The option screen also has a close button for the user to close the option screen. The close button will return the user to the first form again where he/she may click on the exit button to exit the entire application.

Page 10: Jameson Inn, Inc

10

Application Design Cont’d Once the user has chosen an option from the input screen (screen 2), the user will be navigated to the proper screen. If the user chooses the Enter Survey Option, they following screen will be loaded for the user. Survey Screen

The survey form will consist of a survey report from which the user can choose the hotel properties that he or she wishes to view. This survey report consists of eight important attributes that various managers use to rate hotels on a scale of 1 to 4. In the case of a manager needing to update or delete information from a particular survey, he or she will have the option to perform this task on this screen, but only where they are the original author (the text boxes will turn green) of the survey. The user may also view previously generated surveys by selecting the name of the surveyor, name of the property, and/or date of the survey and clicking the retrieve button. The user can return to the previous form by clicking on Close Button.

Page 11: Jameson Inn, Inc

11

Report Screen The report screen displays an average number for previously surveyed inspections of a selected property, for a time frame of one month. The user may view an average number for previously generated surveys by selecting the name of the property, the desired date (by month/year), and clicking the retrieve values button. The user can return to the previous form by clicking on Close Button.

Page 12: Jameson Inn, Inc

12

User’s Guide To

Kitchen Hospitality Scorecard Application

Page 13: Jameson Inn, Inc

13

Enter a valid 9 digit Employee

ID

Page 14: Jameson Inn, Inc

14

Select from the drop down boxes to view individual survey reports based on:

Name of Surveyor, Name of Property, or for surveys

completed on a certain date

Click here after making selections

from the drop down boxes to

view those surveys

Page 15: Jameson Inn, Inc

15

Add a new survey

Update changes to an existing

survey

Delete a previous survey

Values in these boxes can only be

changed if it is a new survey, or if you are logged in as the user

that created that particular survey

Use these buttons to see other surveys

Page 16: Jameson Inn, Inc

16

Select the Property for which you want

to see a monthly average of

Inspection scores

Page 17: Jameson Inn, Inc

17

Choose a Month from the drop down calendar in order to see an average of

scores for a particular property during that month

Page 18: Jameson Inn, Inc

18

The average of all scorecard surveys

completed for a particular month and particular property are averaged and displayed below

Nothing is displayed if a property and

month are not selected!

Page 19: Jameson Inn, Inc

19

Login Form The Login form presents the user with a login view The user id entered by the user authenticates the user login List of Valid User Ids 111111110 111111111 111111112 111111113 If an invalid user id is entered, the application will display an error message. There is no limit to the number of attempts that may be made to login. Upon successful login, the user will be taken to the next screen. Pressing “Exit” will exit the application Input View Form This form allows the user two choices. 1. “Enter Survey” -- Navigates to the view Surveys section of the application 2. “View Reports” -- Navigates to the reporting section of the application Pressing “Close” will navigate to the Login form wherein the user will have to get authenticated again to enter the application Survey Form This screen is displayed upon pressing the “Enter Survey” button on the “Input View Screen”. Functionality Part I: Iterating through and Manipulating the survey records Initially, the entire survey table can be viewed by the user by iterating through the records one at a time by using the buttons on the bottom part of the screen. As the user is iterating through the databases, the text boxes displaying the survey scores and the buttons to update the survey records are disabled. However, if the current record displayed is one that had been created by the user logged in , the text boxes will be enabled with a green background, and the Add, Update and delete buttons will be enabled. The user can now update the records. Please note that Add, Update and Delete functionalities have not been implemented and are currently part of the development in process. Part II: Searching for surveys The user can search for records in the database based on three criterias on the top right hand corner of the screen. Name of Surveyor, Name of Property and/or Date of Survey

Page 20: Jameson Inn, Inc

20

Any combination of these fields can be used to retrieve these records. For example, the user Bartles, James may be chosen and a retrieve command will return all surveys done by him. Or only a property name may be chosen in which call all surveys done for the property will be retrieved. For example, selecting on Property Name “Selma” (with the other selections blank) will retrieve all surveys done for property Selma. If all three values are selected i.e. Surveyor Name, Property Name and date, only one record will be retrieved For example: A selection of Cabrara, Jose Selma 1/1/2002 will return a single record. To remove a criteria from the list of retrieve selections from the text boxes, simply back space on the text box. If all the search boxes are empty, then the entire set of records for the surveys will be retrieved. Pressing the “Close” button navigates the user to the previous form Report Form To retrieve the records make a selection of Property Name and month/year and hit the “Retrieve Values” button. The survey form has four columns for which data can be retrieved. The dataset in each column represents an average of the survey scores done for a property in a particular month. For example, selecting property name = “Selma” and Month = “January 2002”, will retrieve an average of all surveys done for “Selma” in the period “January 2002”. The same can be done for the other three columns. The retrieved records are color coded according to survey score. Score 1 is will return a “Red Background” Score 2 will return a “Yellow Background” Score 3 will return a “Blue” Background Score 4 will return a “Green” Background If a selection does not match a record, no records will be retrieved and the text boxes will be turned to a white back ground. Test Data for surveys in the database Selma , January/2002 Albertville , January 2002 Arab, February 2002

Page 21: Jameson Inn, Inc

21

Florence, March 2002 Pressing the “Close” Button navigates back to the View Screen Future Application Enhancements The design of our application is expected to grow due to the fact that there is a useful need for this application, as well as the fact that this hotel chain is growing dynamically. This application should limit the paper trail Jameson Inn currently creates within its offices. In addition to this feature, employees will now be able to access survey reports easily and efficiently. Some capabilities that can be added to enhance our application are as follows: Future project enhancements:

• Upload information to the corporate database • Export data to Excel files • Automatic Start-up • Print edited reports • Add, Update, Delete Options • Insert New Records • Dynamic Buildup • Create a Form for Advanced Users • Sync to Corporate Database • Web Enabled Application • Increase Testing Robustness

Some of these features could not be completed within this version of our application due to the time constraint we embodied, as well as lack of knowledge. These features are projected in our future project enhancements section and can later meet the client’s requirements further. After learning various features of Visual Basic we learned of various ways to implement a more sophisticated application.

For example, creating a form could be accomplished by using the Visual Basic Form Wizard. This feature would have provided a splash screen for the user, and a more professional setup for our application. This wizard also gives us more functionalities without having to self coded. That way we would be able to quickly modify features to fit our application with less work. Things that surprised us while working on this group project were knowing the importance of project design. We also learned that we needed to be more familiar with new controls such as

Page 22: Jameson Inn, Inc

22

ADO, and combo boxes at an earlier stage during the application development period. Doing this would have allowed a cleaner and more efficient coding process. The largest factor that surprised our group was realizing the shortness of time that we had to complete this project. Lastly, the documentation, especially, was a tedious process, it had to be reformatted and updated on a number of occasions. Valuable lessons we learned from this project include group time management, effective group communication, and the importance of every member being involved. Working with a group was very beneficial because each member contributed their own strengths to the project. Therefore, we were able to appropriately assign various tasks to accomplish our goal in the given amount of time. We learned to anticipate our problems early and not wait to the last minute!

Page 23: Jameson Inn, Inc

Below you will find current facts existing about our client and how they rate in the hotel industry.

Core Competencies Jameson Hospitality, LLC

Low Expertise

Medium Expertise High Expertise

Financial Analysis, P&L Reviews, understanding margin and “flow through”

Anpoc

Ability to analyze Market demographics to determine consumer demand generators. Able to move Brands strength’s to the forefront of consumer interests and spending patterns.

Cap“cueve

Recruiting and Retention of General Managers, Assistant GM’s and “key associates.

bility to determine Capitalization eeds, evaluate process and rojects. Create 3-5 year plans in rder to stay ahead of the ompetition.

23

Expert

Understanding of Quality Assurance

initiatives and Brand Standards

Company’s that have created a public image anormally referred to as “it”. Marriott would b

Companies that have done a very good job. Aseen as an imitate threat to their competition ifbit to conservative to dominate.

Companies that do an average to slightly abovmainstream. Oblivious to outside forces. In dknow market niche.

Capable of creating independent Sales focus. Able to evaluate market a execute action plan.

Ucao

able of delivering Service lture” to every guest, every time, ry day.

nderstands principal issues of ontrols and accountability. Evaluates nd analyzes and insures compliances f best practices for Internal Audit

s being the best in their class. Are e an example.

re consistent in delivery and can be they “notch it up”. May be seen as a

e average job in delivery. Seen as anger of loosing market share or some

Page 24: Jameson Inn, Inc

24

Market Summary Jameson Inns, Inc. is a real estate investment trust trading under the symbol JAMS on the NASDAQ market. Jameson Inns, Inc. develops and owns the Jameson Inn and Signature Inn hotel brands. The company is growing in size and it needs away way to store lots of data without having a paper trail and a friendly user interface. Figure 3

Market Summary Trading Symbol JAMS Exchange NASDAQ Market Value ($M) 41.03 Stock Quote $3.46 Change $0.00

0.03 % As of May 29, 2002

2 Financial Values The company is growing yearly. Here is a view of the Inn’s financial statement from the year 2001. Most notably the companys total assets of $339,361. Although the company is not as big as others hotel in the industry it is steadly growing. Customer satisfaction is very important to the company and they are willing to do what it takes to meet the needs of the customer. Figure 4 Balance Sheet (dollars in thousands) 2001Y 2000Y 2001Y/

2000 Ch (%)

1999Y 2000/ 1999Y

Gross Depreciable Properties 369,174 357,928 3.14 298,479 19.92 Accumulated Depreciation 51,874 38,325 35.35 24,377 57.22 Net Property Investments 317,300 319,603 (0.72) 274,102 16.60 Total Nondepreciable Properties 12,575 14,487 (13.20) 22,482 (35.56) Net Real Estate Investment 329,874 334,091 (1.26) 296,584 12.65 Total Assets 339,361 340,943 (0.46) 322,852 5.60 Total Debt 227,063 207,145 9.62 173,958 19.08 Common Equity 30,967 51,093 (39.39) 59,365 (13.93)

2 www.jamesoninn.com

Page 25: Jameson Inn, Inc

25

Appendix VERSION 5.00 Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX" Begin VB.Form frmStart BackColor = &H00E0E0E0& Caption = "Jameson Hospitality, LLC" ClientHeight = 8190 ClientLeft = 60 ClientTop = 450 ClientWidth = 12360 BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty LinkTopic = "Form1" ScaleHeight = 8190 ScaleWidth = 12360 StartUpPosition = 2 'CenterScreen Begin MSAdodcLib.Adodc adoHotel Height = 735 Left = 10800 Top = 600 Visible = 0 'False Width = 2295 _ExtentX = 4048 _ExtentY = 1296 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "" OLEDBString = ""

Page 26: Jameson Inn, Inc

26

OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "" Caption = "" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.CommandButton cmdEnter Caption = "&Enter" Height = 615 Left = 8880 TabIndex = 4 Top = 4800 Width = 2895 End Begin VB.CommandButton cmdExit Caption = "E&xit" Height = 615 Left = 9000 TabIndex = 3 Top = 7080 Width = 2775 End Begin VB.TextBox txtEmpId Height = 615 Left = 8880 MaxLength = 9 TabIndex = 1 Top = 3720 Width = 2895 End Begin VB.PictureBox picDisplay BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 1095 Left = 240 Picture = "frmStart.frx":0000

Page 27: Jameson Inn, Inc

27

ScaleHeight = 1035 ScaleWidth = 5475 TabIndex = 0 Top = 1920 Width = 5535 End Begin VB.Image Image1 Height = 1500 Left = 0 Picture = "frmStart.frx":2763 Top = 120 Width = 9600 End Begin VB.Image imgDisplay Height = 3255 Left = 720 Picture = "frmStart.frx":E0DB Stretch = -1 'True Top = 3240 Width = 4800 End Begin VB.Label lblId Caption = "Enter your Employee Id" Height = 615 Left = 6120 TabIndex = 2 Top = 3720 Width = 2535 End End Attribute VB_Name = "frmStart" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub cmdEnter_Click() 'Declare Variables Dim isValidEmployee As Boolean isValidEmployee = False 'Read employee id as entered g_employeeId = Trim(txtEmpId.Text) 'Check for employeeId validity validateEmployeeID g_employeeId, isValidEmployee If (isValidEmployee) Then frmInputView.Show Unload Me Else

Page 28: Jameson Inn, Inc

28

MsgBox "The user id entered is not valid", , "Invalid User Id" End If End Sub Private Sub cmdExit_Click() End End Sub Public Sub validateEmployeeID(employeeId As String, isValidEmployee As Boolean) Dim employeeSQL As String employeeSQL = "Select employeeID, employeeFirstName, EmployeeLastName from Employee " & _ "where employeeID= '" & employeeId & "'" 'Retrieve the record set from the database With adoHotel .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Persist Security Info=False;Data Source=" _ & App.Path + "\JamesonHotels.mdb" .CommandType = adCmdText .RecordSource = employeeSQL .Refresh End With 'Check for a match If adoHotel.Recordset.RecordCount > 0 Then g_employeeName = adoHotel.Recordset.Fields("employeeFirstName") & " " & _ adoHotel.Recordset.Fields("employeeLastName") isValidEmployee = True End If End Sub

Page 29: Jameson Inn, Inc

29

VERSION 5.00 Begin VB.Form frmInputView BackColor = &H00E0E0E0& Caption = "Input View" ClientHeight = 5580 ClientLeft = 60 ClientTop = 450 ClientWidth = 11010 LinkTopic = "Form1" ScaleHeight = 5580 ScaleWidth = 11010 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton cmdSurvey Caption = "Enter &Survey" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 975 Left = 1440 TabIndex = 2 Top = 2160 Width = 3495 End Begin VB.CommandButton cmdReport Caption = "View &Reports" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 975 Left = 6000 TabIndex = 1 Top = 2160 Width = 3615 End Begin VB.CommandButton cmdClose Caption = "&Close" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False

Page 30: Jameson Inn, Inc

30

Strikethrough = 0 'False EndProperty Height = 735 Left = 7320 TabIndex = 0 Top = 3960 Width = 2175 End Begin VB.Image Image1 Height = 1740 Left = 0 Picture = "frmInputView.frx":0000 Stretch = -1 'True Top = 0 Width = 10920 End End Attribute VB_Name = "frmInputView" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub cmdClose_Click() frmStart.Show Unload Me End Sub Private Sub cmdReport_Click() frmReport.Show Unload Me End Sub Private Sub cmdSurvey_Click() frmSurvey.Show Unload Me

End Sub

Page 31: Jameson Inn, Inc

31

VERSION 5.00 Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX" Begin VB.Form frmSurvey BackColor = &H00E0E0E0& Caption = "Survey" ClientHeight = 8790 ClientLeft = 3060 ClientTop = 450 ClientWidth = 14070 LinkTopic = "Form1" ScaleHeight = 8790 ScaleWidth = 14070 StartUpPosition = 2 'CenterScreen Begin MSAdodcLib.Adodc adoSurveyManipulate Height = 495 Left = 9360 Top = 11640 Visible = 0 'False Width = 1575 _ExtentX = 2778 _ExtentY = 873 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from survey where PropertyId = 0" Caption = "adoSurveyManipulate" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0

Page 32: Jameson Inn, Inc

32

Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.TextBox txtKeys DataField = "propName" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 3 Left = 3240 TabIndex = 36 Top = 3000 Width = 2175 End Begin VB.TextBox txtKeys DataField = "fullName" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 2 Left = 240 TabIndex = 35 Top = 3000 Width = 2175 End Begin VB.CommandButton cmdRecordMove Caption = "&Next Record" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False

Page 33: Jameson Inn, Inc

33

Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 2 Left = 4560 TabIndex = 31 Top = 7800 Width = 2055 End Begin VB.CommandButton cmdRecordMove Caption = "&Last Record" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 3 Left = 6840 TabIndex = 30 Top = 7800 Width = 2055 End Begin VB.CommandButton cmdRecordMove Caption = "&Previous Record" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 1 Left = 2280 TabIndex = 29 Top = 7800 Width = 2055 End Begin VB.CommandButton cmdRecordMove Caption = "&First Record" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False

Page 34: Jameson Inn, Inc

34

Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 0 Left = 120 TabIndex = 28 Top = 7800 Width = 2055 End Begin VB.TextBox txtKeys DataField = "ContBrkfast" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 12 Left = 9000 TabIndex = 27 Top = 6720 Width = 2175 End Begin VB.TextBox txtKeys DataField = "SwimFitCenter" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 11 Left = 9000 TabIndex = 26 Top = 5760 Width = 2175 End Begin VB.TextBox txtKeys DataField = "ComfortBedFurn" DataSource = "adoSurvey"

Page 35: Jameson Inn, Inc

35

Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 10 Left = 9000 TabIndex = 25 Top = 4800 Width = 2175 End Begin VB.TextBox txtKeys DataField = "RoomDecor" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 9 Left = 9000 TabIndex = 24 Top = 3750 Width = 2175 End Begin VB.TextBox txtKeys DataField = "StaffFriend" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 8 Left = 3240 TabIndex = 23

Page 36: Jameson Inn, Inc

36

Top = 6780 Width = 2175 End Begin VB.TextBox txtKeys DataField = "EmpAttitude" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 7 Left = 3240 TabIndex = 22 Top = 5760 Width = 2175 End Begin VB.TextBox txtKeys DataField = "BathClean" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 6 Left = 3240 TabIndex = 21 Top = 4695 Width = 2175 End Begin VB.TextBox txtKeys DataField = "RoomClean" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False

Page 37: Jameson Inn, Inc

37

EndProperty Height = 495 Index = 5 Left = 3240 TabIndex = 20 Top = 3840 Width = 2175 End Begin VB.TextBox txtKeys DataField = "PropertyId" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 1 Left = 11280 TabIndex = 19 Top = 2160 Visible = 0 'False Width = 2175 End Begin VB.TextBox txtKeys DataField = "EmployeeId" DataSource = "adoSurvey" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 0 Left = 9000 TabIndex = 18 Top = 2160 Visible = 0 'False Width = 2175 End Begin VB.TextBox txtKeys BackColor = &H00FFFFFF& DataField = "Date" DataSource = "adoSurvey" Enabled = 0 'False

Page 38: Jameson Inn, Inc

38

BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 4 Left = 6000 TabIndex = 17 Top = 3000 Width = 2175 End Begin VB.CommandButton cmdRetrieve Caption = "Retrieve" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Left = 11640 TabIndex = 3 ToolTipText = "Retrieve Records based upon Above Selection" Top = 1320 Width = 2055 End Begin MSAdodcLib.Adodc adoSurvey Height = 495 Left = 9360 Top = 11040 Visible = 0 'False Width = 1695 _ExtentX = 2990 _ExtentY = 873 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0

Page 39: Jameson Inn, Inc

39

EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "SurveyQuery" Caption = "adoSurveyQuery" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.ComboBox cmbEmployee Height = 315 Left = 7560 TabIndex = 0 Top = 720 Width = 2295 End Begin MSAdodcLib.Adodc AdoHotel Height = 495 Left = 9360 Top = 10320 Visible = 0 'False Width = 1695 _ExtentX = 2990 _ExtentY = 873 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0

Page 40: Jameson Inn, Inc

40

BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "Employee" Caption = "adoHotel" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.CommandButton cmdSurvey Caption = "&Close" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 4 Left = 11640 TabIndex = 15 Top = 7680 Width = 2055 End Begin VB.CommandButton cmdSurvey Caption = "&Update" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0

Page 41: Jameson Inn, Inc

41

Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 1 Left = 11640 TabIndex = 14 Top = 4800 Width = 2055 End Begin VB.CommandButton cmdSurvey Caption = "&Delete" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Index = 2 Left = 11640 TabIndex = 13 Top = 6120 Width = 2055 End Begin VB.CommandButton cmdSurvey Caption = "&Add" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 0 Left = 11640 TabIndex = 12 ToolTipText = "Add a Record" Top = 3720 Width = 2055 End Begin VB.TextBox txtDate DataField = "Date" Height = 375 Left = 12240

Page 42: Jameson Inn, Inc

42

TabIndex = 2 Top = 720 Width = 1575 End Begin VB.ComboBox cmbProperties Height = 315 ItemData = "frmSurvey.frx":0000 Left = 9960 List = "frmSurvey.frx":0002 TabIndex = 1 Top = 720 Width = 1935 End Begin VB.Image Image1 Height = 1380 Left = 0 Picture = "frmSurvey.frx":0004 Stretch = -1 'True Top = 600 Width = 7440 End Begin VB.Line Line1 BorderWidth = 5 X1 = 0 X2 = 13920 Y1 = 2040 Y2 = 2040 End Begin VB.Label lblCategory Caption = "Name of Surveyor" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 13 Left = 7680 TabIndex = 39 Top = 120 Width = 2055 End Begin VB.Label lblCategory Caption = "Name of Property" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False

Page 43: Jameson Inn, Inc

43

Strikethrough = 0 'False EndProperty Height = 255 Index = 12 Left = 9960 TabIndex = 38 Top = 120 Width = 2055 End Begin VB.Label lblCategory Caption = "Date Of Survey (MM/DD/YYYY)" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 11 Left = 12240 TabIndex = 37 Top = 120 Width = 1695 End Begin VB.Label lblCategory Caption = "Date Of Survey" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 10 Left = 6000 TabIndex = 34 Top = 2640 Width = 2055 End Begin VB.Label lblCategory Caption = "Name of Property" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False

Page 44: Jameson Inn, Inc

44

EndProperty Height = 255 Index = 9 Left = 3240 TabIndex = 33 Top = 2640 Width = 2055 End Begin VB.Label lblCategory Caption = "Name of Surveyor" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Index = 8 Left = 240 TabIndex = 32 Top = 2640 Width = 2055 End Begin VB.Label Label1 Caption = "To view a survey report, choose name, property and enter a date:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 0 TabIndex = 16 Top = 120 Width = 7455 End Begin VB.Label lblCategory Caption = "Continental Breakfast" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False

Page 45: Jameson Inn, Inc

45

EndProperty Height = 615 Index = 7 Left = 6000 TabIndex = 11 Top = 6840 Width = 2655 End Begin VB.Label lblCategory Caption = "Swimming Pool & Fitness Center" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 6 Left = 6000 TabIndex = 10 Top = 5760 Width = 2655 End Begin VB.Label lblCategory Caption = "Comfort of Bed & Furniture" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 5 Left = 6000 TabIndex = 9 Top = 4680 Width = 2655 End Begin VB.Label lblCategory Caption = "Room Decor" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty

Page 46: Jameson Inn, Inc

46

Height = 615 Index = 4 Left = 6000 TabIndex = 8 Top = 3720 Width = 2655 End Begin VB.Label lblCategory Caption = "Staff Friendliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 3 Left = 240 TabIndex = 7 Top = 6720 Width = 2655 End Begin VB.Label lblCategory Caption = "Employees' ""Can do"" Attitude" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 2 Left = 240 TabIndex = 6 Top = 5640 Width = 2655 End Begin VB.Label lblCategory Caption = "Bathroom Cleanliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty

Page 47: Jameson Inn, Inc

47

Height = 615 Index = 1 Left = 240 TabIndex = 5 Top = 4680 Width = 2535 End Begin VB.Label lblCategory Caption = "Room Cleanliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Index = 0 Left = 240 TabIndex = 4 Top = 3720 Width = 2655 End End Attribute VB_Name = "frmSurvey" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Const Add As Integer = 0 Const Update As Integer = 1 Const Delete As Integer = 2 Const ref As Integer = 3 Const Leave As Integer = 4 Const First As Integer = 0 Const Previous As Integer = 1 Const NextRec As Integer = 2 Const Last As Integer = 3 Dim strSQL As String Dim strBringBackSQL As String Dim propertyId As String Dim propertyName As String Dim employeeId As String Dim employeeName As String Dim arrayEmployeeId() As String Dim arrayPropertyId() As String Dim recordsFound As Boolean Private Sub cmdClose_Click() frmInputView.Show Unload Me End Sub

Page 48: Jameson Inn, Inc

48

Private Sub cmdRecordMove_Click(Index As Integer) 'Create ability to iterate through the records Select Case Index Case First adoSurvey.Recordset.MoveFirst Case Previous adoSurvey.Recordset.MovePrevious If adoSurvey.Recordset.BOF Then adoSurvey.Recordset.MoveNext End If Case NextRec adoSurvey.Recordset.MoveNext If adoSurvey.Recordset.EOF Then adoSurvey.Recordset.MovePrevious End If Case Last adoSurvey.Recordset.MoveLast End Select 'Disable/Enable Options enableOptions End Sub Private Sub cmdRetrieve_Click() 'Declare Variables Dim strSQL2 As String Dim strSQL3 As String Dim strSQL4 As String Dim i As Integer recordsFound = False 'Build Base SQL strSQL = "SELECT Survey.EmployeeId, Employee.employeeLastName + ', ' +Employee.employeeFirstName as fullName, " & _ "Survey.PropertyId, Properties.propName, Survey.Date, Survey.RoomClean, Survey.BathClean, " & _ "Survey.EmpAttitude, Survey.StaffFriend, Survey.RoomDecor, Survey.ComfortBedFurn, Survey.SwimFitCenter, Survey.ContBrkfast " & _ "FROM Employee, Properties, Survey " & _ "WHERE Employee.employeeId = Survey.EmployeeId " & _ "and Properties.PropId = Survey.PropertyId " strSQL2 = "and Survey.employeeId <> ' ' " strSQL3 = "and Survey.PropertyId <> ' ' "

Page 49: Jameson Inn, Inc

49

strSQL4 = "and Survey.date > 01/01/1900 " 'Update SQL for items selected 'Check for items selected If cmbEmployee.ListIndex > -1 Then strSQL2 = "and Survey.employeeId = '" & arrayEmployeeId(cmbEmployee.ListIndex) & "' " End If If cmbProperties.ListIndex > -1 Then strSQL3 = "and Survey.PropertyId = '" & arrayPropertyId(cmbProperties.ListIndex) & "' " End If If Trim(txtDate.Text) <> "" Then strSQL4 = "and Survey.date = #" & Trim(txtDate.Text) & "#" End If strSQL = strSQL + strSQL2 + strSQL3 + strSQL4 'Build Dynamic SQL retrieveSurveyRecords strSQL 'Enable/Disable Buttons enableOptions End Sub Private Sub cmdSurvey_Click(Index As Integer) Select Case Index Case Add 'Check to validate all primary keys chosen If validAdd Then 'Create insert sql strSQL = "Insert into Survey " & _ "set Survey.EmployeeId = " & g_employeeId & _ "Survey.PropertyId = " & arrayPropertyId(cmbProperties.ListIndex) & _ "Survey.date = " & Trim(txtDate.Text) 'Test 'Text1.Text = "DeletSQL is : " & vbCrLf & strSQL 'Insert into Survey MsgBox "Add records functionality to be implemented", "Add Records" Else MsgBox "Please choose your name, property Name & date of survey ", , "Survey: Add" End If

Page 50: Jameson Inn, Inc

50

Case Update 'create update sql MsgBox "Update records functionality to be implemented", "Update Records" Case Delete 'create delete sql strSQL = "delete from surveytest" & _ " where employeeId= " & txtKeys(0).Text & _ " and propertyId= " & txtKeys(1).Text & _ " and Date = #" & txtKeys(4).Text & "#" 'Test 'Text1.Text = "DeleteSQL is : " & vbCrLf & strSQL MsgBox "Delete records functionality to be implemented", "Delete Records" Case Leave frmInputView.Show Unload Me End Select End Sub Private Sub Form_Load() 'Assign the database Name g_databaseName = "JamesonHotels.mdb" 'Build SQL, retrieve recordset, populate Employee values strSQL = "Select employeeId, employeeFirstName, employeeLastName from employee order by employeeLastName" retrieveRecordSet strSQL populateEmployee 'Build SQL, retrieve recordset, populate property values strSQL = "Select propId, propName from Properties order by propName" retrieveRecordSet strSQL populateProperty 'Enable the buttons enableOptions End Sub Public Sub retrieveRecordSet(strSQL As String) 'Retrieve the record set from the database With adoHotel .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Persist Security Info=False;Data Source=" _

Page 51: Jameson Inn, Inc

51

& App.Path + "\" + g_databaseName .CommandType = adCmdText .RecordSource = strSQL .Refresh End With 'Check for No Records Found If adoSurvey.Recordset.RecordCount = 0 Then recordsFound = False MsgBox "No records found", , "Records" Else recordsFound = True End If End Sub Public Sub populateProperty() 'Declare Variables Dim noOfRecords As Long Dim i As Long noOfRecords = adoHotel.Recordset.RecordCount ReDim arrayPropertyId(noOfRecords) adoHotel.Recordset.MoveFirst For i = 0 To (noOfRecords - 1) 'Read in the values of the Property table propertyId = adoHotel.Recordset.Fields(0) propertyName = adoHotel.Recordset.Fields(1) ' Add items to the array and drop down box arrayPropertyId(i) = propertyId cmbProperties.AddItem (propertyName) adoHotel.Recordset.MoveNext Next i End Sub Public Sub populateEmployee() 'Declare Variables Dim noOfRecords As Long Dim i As Long noOfRecords = adoHotel.Recordset.RecordCount ReDim arrayEmployeeId(noOfRecords) adoHotel.Recordset.MoveFirst For i = 0 To (noOfRecords - 1) 'Read in the values of the Property table employeeId = adoHotel.Recordset.Fields(0) employeeName = adoHotel.Recordset.Fields(2) & ", " & adoHotel.Recordset.Fields(1) ' Add items to the array and drop down box

Page 52: Jameson Inn, Inc

52

arrayEmployeeId(i) = employeeId cmbEmployee.AddItem (employeeName) adoHotel.Recordset.MoveNext Next i End Sub Public Sub retrieveSurveyRecords(strSQL As String) With adoSurvey .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Persist Security Info=False;Data Source=" _ & App.Path + "\" + g_databaseName .CommandType = adCmdText .RecordSource = strSQL .Refresh End With 'Check for No Records Found If adoSurvey.Recordset.RecordCount = 0 Then recordsFound = False MsgBox "No records found", , "Records" Else recordsFound = True End If End Sub Public Sub enableOptions() 'Check to see if the record belongs to the employee Logged in 'Declare Variable 'Run Option only if some records were found Dim i As Integer If recordsFound Then If txtKeys(0) = g_employeeId Then 'Enable Buttons For i = 0 To 2 cmdSurvey(i).Enabled = True Next i 'Enable Text Boxes For i = 4 To 12 txtKeys(i).Enabled = True txtKeys(i).BackColor = vbGreen Next i Else 'Disable Buttons For i = 0 To 2 cmdSurvey(i).Enabled = False Next i 'Disable Text Boxes

Page 53: Jameson Inn, Inc

53

For i = 4 To 12 txtKeys(i).Enabled = False txtKeys(i).BackColor = &H80000005 Next i End If End If End Sub Public Function validAdd() As Boolean validAdd = False ' Allowed to add if own id chosen, property chosen and date is valid If cmbEmployee.ListIndex <> -1 Then If (arrayEmployeeId(cmbEmployee.ListIndex) = g_employeeId) Then If cmbProperties.ListIndex <> -1 Then If isValidDate(Trim(txtDate.Text)) Then validAdd = True End If End If End If End If End Function Public Function isValidDate(dateText As String) As Boolean isValidDate = False 'Implement code to test date isValidDate = True End Function Private Sub txtKeys_KeyPress(Index As Integer, KeyAscii As Integer) Dim origValue As Integer 'Check for edits in the text boxes for criteria values only If (Index >= 5) Then 'Only Values 1 - 4 are valid If ((KeyAscii >= 49 And KeyAscii <= 52) Or KeyAscii = 8) Then Else Beep MsgBox "Valid Values for The survey is 1 to 4 ", , "Invalid Values" KeyAscii = 0 End If End If

Page 54: Jameson Inn, Inc

54

End Sub VERSION 5.00 Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX" Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX" Begin VB.Form frmReport Caption = "Survey Reports" ClientHeight = 8640 ClientLeft = 60 ClientTop = 450 ClientWidth = 12270 ForeColor = &H80000008& LinkTopic = "Form1" ScaleHeight = 8640 ScaleWidth = 12270 StartUpPosition = 2 'CenterScreen Begin MSAdodcLib.Adodc Adodc2 Height = 375 Left = 10320 Top = 8160 Visible = 0 'False Width = 1200 _ExtentX = 2117 _ExtentY = 661 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 1 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = -1 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "select * from Properties order by propName"

Page 55: Jameson Inn, Inc

55

Caption = "Adodc2" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.TextBox Text1 Height = 615 Left = 1800 TabIndex = 50 Text = "Text1" Top = 7920 Visible = 0 'False Width = 735 End Begin VB.ComboBox cmbProperties DataSource = "Adodc2" Height = 315 Index = 3 Left = 9600 TabIndex = 46 Top = 120 Width = 1935 End Begin VB.ComboBox cmbProperties DataSource = "Adodc2" Height = 315 Index = 2 Left = 7560 TabIndex = 45 Top = 120 Width = 1935 End Begin VB.ComboBox cmbProperties DataSource = "Adodc2" Height = 315 Index = 1 Left = 5520 TabIndex = 44 Top = 120 Width = 1935 End Begin MSComCtl2.DTPicker DTPicker1 Height = 375 Index = 0 Left = 3480 TabIndex = 43 Top = 600 Width = 1935

Page 56: Jameson Inn, Inc

56

_ExtentX = 3413 _ExtentY = 661 _Version = 393216 CustomFormat = "MMMM yyyy" Format = 19660803 CurrentDate = 37409 End Begin VB.ComboBox cmbProperties DataSource = "Adodc2" Height = 315 Index = 0 Left = 3480 TabIndex = 1 Top = 120 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomClean" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 0 Left = 3480 TabIndex = 2 Top = 1200 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of BathClean" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 1

Page 57: Jameson Inn, Inc

57

Left = 3480 TabIndex = 3 Top = 2040 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of EmpAttitude" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 2 Left = 3480 TabIndex = 4 Top = 2880 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of StaffFriend" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 3 Left = 3480 TabIndex = 5 Top = 3720 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomDecor" DataSource = "Adodc1(0)" BeginProperty Font

Page 58: Jameson Inn, Inc

58

Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 4 Left = 3480 TabIndex = 6 Top = 4560 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ComfortBedFurn" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 5 Left = 3480 TabIndex = 7 Top = 5400 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of SwimFitCenter" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 6

Page 59: Jameson Inn, Inc

59

Left = 3480 TabIndex = 8 Top = 6240 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ContBrkfast" DataSource = "Adodc1(0)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 7 Left = 3480 TabIndex = 9 Top = 7080 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ContBrkfast" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 31 Left = 9600 TabIndex = 42 Top = 7080 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ContBrkfast" DataSource = "Adodc1(2)"

Page 60: Jameson Inn, Inc

60

BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 23 Left = 7560 TabIndex = 41 Top = 7080 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ContBrkfast" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 15 Left = 5520 TabIndex = 17 Top = 7080 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of SwimFitCenter" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735

Page 61: Jameson Inn, Inc

61

Index = 30 Left = 9600 TabIndex = 40 Top = 6240 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ComfortBedFurn" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 29 Left = 9600 TabIndex = 39 Top = 5400 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomDecor" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 28 Left = 9600 TabIndex = 38 Top = 4560 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of StaffFriend"

Page 62: Jameson Inn, Inc

62

DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 27 Left = 9600 TabIndex = 37 Top = 3720 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of EmpAttitude" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 26 Left = 9600 TabIndex = 36 Top = 2880 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of BathClean" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF&

Page 63: Jameson Inn, Inc

63

Height = 735 Index = 25 Left = 9600 TabIndex = 35 Top = 2040 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomClean" DataSource = "Adodc1(3)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 24 Left = 9600 TabIndex = 34 Top = 1200 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of SwimFitCenter" DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 22 Left = 7560 TabIndex = 33 Top = 6240 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ComfortBedFurn"

Page 64: Jameson Inn, Inc

64

DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 21 Left = 7560 TabIndex = 32 Top = 5400 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomDecor" DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 20 Left = 7560 TabIndex = 31 Top = 4560 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of StaffFriend" DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF&

Page 65: Jameson Inn, Inc

65

Height = 735 Index = 19 Left = 7560 TabIndex = 30 Top = 3720 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of EmpAttitude" DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 18 Left = 7560 TabIndex = 29 Top = 2880 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of BathClean" DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 17 Left = 7560 TabIndex = 19 Top = 2040 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomClean"

Page 66: Jameson Inn, Inc

66

DataSource = "Adodc1(2)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 16 Left = 7560 TabIndex = 18 Top = 1200 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of SwimFitCenter" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 14 Left = 5520 TabIndex = 16 Top = 6240 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of ComfortBedFurn" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF&

Page 67: Jameson Inn, Inc

67

Height = 735 Index = 13 Left = 5520 TabIndex = 15 Top = 5400 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomDecor" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 12 Left = 5520 TabIndex = 14 Top = 4560 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of StaffFriend" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 11 Left = 5520 TabIndex = 13 Top = 3720 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of EmpAttitude"

Page 68: Jameson Inn, Inc

68

DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 10 Left = 5520 TabIndex = 12 Top = 2880 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of BathClean" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 735 Index = 9 Left = 5520 TabIndex = 11 Top = 2040 Width = 1935 End Begin VB.TextBox txtDisplay Alignment = 2 'Center BackColor = &H00FFFFFF& DataField = "Avg Of RoomClean" DataSource = "Adodc1(1)" BeginProperty Font Name = "Times New Roman" Size = 26.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF&

Page 69: Jameson Inn, Inc

69

Height = 735 Index = 8 Left = 5520 TabIndex = 10 Top = 1200 Width = 1935 End Begin VB.CommandButton cmdResults Caption = "Retrieve Values" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = 360 TabIndex = 0 Top = 120 Width = 2655 End Begin MSAdodcLib.Adodc Adodc1 Height = 735 Index = 0 Left = 240 Top = 7920 Visible = 0 'False Width = 1335 _ExtentX = 2355 _ExtentY = 1296 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = 0 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False"

Page 70: Jameson Inn, Inc

70

OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "reportQuery2" Caption = "Adodc1" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.CommandButton cmdClose Caption = "&Close" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 8520 TabIndex = 20 Top = 8040 Width = 1575 End Begin MSComCtl2.DTPicker DTPicker1 Height = 375 Index = 1 Left = 5520 TabIndex = 47 Top = 600 Width = 1935 _ExtentX = 3413 _ExtentY = 661 _Version = 393216 CustomFormat = "MMMM yyyy" Format = 19660803 CurrentDate = 37348 End Begin MSComCtl2.DTPicker DTPicker1 Height = 375 Index = 2 Left = 7560

Page 71: Jameson Inn, Inc

71

TabIndex = 48 Top = 600 Width = 1935 _ExtentX = 3413 _ExtentY = 661 _Version = 393216 CustomFormat = "MMMM yyyy" Format = 19660803 CurrentDate = 37348 End Begin MSComCtl2.DTPicker DTPicker1 Height = 375 Index = 3 Left = 9600 TabIndex = 49 Top = 600 Width = 1935 _ExtentX = 3413 _ExtentY = 661 _Version = 393216 CustomFormat = "MMMM yyyy" Format = 19660803 CurrentDate = 37348 End Begin MSAdodcLib.Adodc Adodc1 Height = 735 Index = 1 Left = 3000 Top = 7920 Visible = 0 'False Width = 1335 _ExtentX = 2355 _ExtentY = 1296 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = 0 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False"

Page 72: Jameson Inn, Inc

72

OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "reportQuery2" Caption = "Adodc1" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adodc1 Height = 735 Index = 2 Left = 4920 Top = 7920 Visible = 0 'False Width = 1335 _ExtentX = 2355 _ExtentY = 1296 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = 0 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = ""

Page 73: Jameson Inn, Inc

73

UserName = "" Password = "" RecordSource = "reportQuery2" Caption = "Adodc1" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin MSAdodcLib.Adodc Adodc1 Height = 735 Index = 3 Left = 6720 Top = 7800 Visible = 0 'False Width = 1335 _ExtentX = 2355 _ExtentY = 1296 ConnectMode = 0 CursorLocation = 3 IsolationLevel = -1 ConnectionTimeout= 15 CommandTimeout = 30 CursorType = 3 LockType = 3 CommandType = 2 CursorOptions = 0 CacheSize = 50 MaxRecords = 0 BOFAction = 0 EOFAction = 0 ConnectStringType= 1 Appearance = 1 BackColor = -2147483643 ForeColor = -2147483640 Orientation = 0 Enabled = 0 Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:\JamesonHotels.mdb;Persist Security Info=False" OLEDBFile = "" DataSourceName = "" OtherAttributes = "" UserName = "" Password = "" RecordSource = "reportQuery2" Caption = "Adodc1" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}

Page 74: Jameson Inn, Inc

74

Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty _Version = 393216 End Begin VB.Label lblcriteria Caption = "Swimming Pool / Fitness Center" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 6 Left = 600 TabIndex = 28 Top = 6360 Width = 2655 End Begin VB.Label lblcriteria Caption = "Room Cleanliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 0 Left = 600 TabIndex = 27 Top = 1320 Width = 2655 End Begin VB.Label lblcriteria Caption = "Bathroom Cleanliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False

Page 75: Jameson Inn, Inc

75

Strikethrough = 0 'False EndProperty Height = 495 Index = 1 Left = 600 TabIndex = 26 Top = 2280 Width = 2655 End Begin VB.Label lblcriteria Caption = "Employee ""Can Do"" Attitude" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 2 Left = 600 TabIndex = 25 Top = 3000 Width = 2655 End Begin VB.Label lblcriteria Caption = "Staff Friendliness" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 3 Left = 600 TabIndex = 24 Top = 3840 Width = 2655 End Begin VB.Label lblcriteria Caption = "Room Decor" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False

Page 76: Jameson Inn, Inc

76

EndProperty Height = 495 Index = 4 Left = 600 TabIndex = 23 Top = 4680 Width = 2655 End Begin VB.Label lblcriteria Caption = "Comfort of Bed_Furniture" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 5 Left = 600 TabIndex = 22 Top = 5520 Width = 2655 End Begin VB.Label lblcriteria Caption = "Continental Breakfast" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Index = 7 Left = 600 TabIndex = 21 Top = 7200 Width = 2655 End End Attribute VB_Name = "frmReport" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim month As Integer Dim strSQL As String Dim propID As String Dim selected As String

Page 77: Jameson Inn, Inc

77

Dim dateSelect As String Dim arrayPropertyId() As String 'Private Sub cmbProperties_LostFocus() ' selected = cmbProperties(0).Text 'End Sub Private Sub cmdClose_Click() frmInputView.Show Unload Me End Sub Private Sub cmdResults_Click() Dim i As Integer changeBackGroundToWhite For i = 0 To 3 If cmbProperties(i).ListIndex > -1 Then createSQL i Adodc1(i).Enabled = True retrieveRecords strSQL, i changeColor i End If Next i 'Change the color of the text boxes 'changeColor End Sub Private Sub retrieveRecords(strSQL As String, Index As Integer) With Adodc1(Index) .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Persist Security Info=False;Data Source=" _ & App.Path + "\JamesonHotels.mdb" .CommandType = adCmdText .RecordSource = strSQL .Refresh ' If .Recordset.RecordCount = 0 Then ' MsgBox "No Records Found. Please check selections. ", , "Records Not Found" ' End If ' End With End Sub Private Sub Form_Load() 'Populate Property Dropdown box populatePropertyId

Page 78: Jameson Inn, Inc

78

End Sub Public Sub populatePropertyId() 'Declare Variables Dim propName As String Dim count As Integer Dim i As Integer 'Read the recordset With Adodc2 .Refresh End With ' Set the array size count = Adodc2.Recordset.RecordCount ReDim arrayPropertyId(count) Adodc2.Recordset.MoveFirst 'Populate Property Dropdown and Array For i = 0 To count - 1 propName = Adodc2.Recordset.Fields(1) propID = Adodc2.Recordset.Fields(0) cmbProperties(0).AddItem (propName) cmbProperties(1).AddItem (propName) cmbProperties(2).AddItem (propName) cmbProperties(3).AddItem (propName) arrayPropertyId(i) = propID Adodc2.Recordset.MoveNext Next i End Sub Public Sub createSQL(Index As Integer) 'Declare Variables Dim month As String Dim year As String Dim propertyId As String 'Pull values from calendar month = DTPicker1(Index).month If Len(month) < 2 Then month = "0" & month End If year = DTPicker1(Index).year 'Check Property Id If cmbProperties(Index).ListIndex > -1 Then propertyId = arrayPropertyId(cmbProperties(Index).ListIndex)

Page 79: Jameson Inn, Inc

79

'Build SQL strSQL = "Select * FROM reportQuery2" & _ " where propertyId = '" & propertyId & "'" & _ " and DateByMonth = '" & month & "/" & year & "'" Text1.Text = strSQL End If End Sub Public Sub changeColor(Index As Integer) Dim i As Integer Select Case Index Case 0 For i = 0 To 7 If txtDisplay(i) = "1" Then txtDisplay(i).BackColor = vbRed If txtDisplay(i) = "2" Then txtDisplay(i).BackColor = vbYellow If txtDisplay(i) = "3" Then txtDisplay(i).BackColor = vbBlue If txtDisplay(i) = "4" Then txtDisplay(i).BackColor = vbGreen txtDisplay(i).ForeColor = vbBlack txtDisplay(i).Enabled = False Next i Case 1 For i = 8 To 15 If txtDisplay(i) = "1" Then txtDisplay(i).BackColor = vbRed If txtDisplay(i) = "2" Then txtDisplay(i).BackColor = vbYellow If txtDisplay(i) = "3" Then txtDisplay(i).BackColor = vbBlue If txtDisplay(i) = "4" Then txtDisplay(i).BackColor = vbGreen txtDisplay(i).ForeColor = vbBlack txtDisplay(i).Enabled = False Next i Case 2 For i = 16 To 23 If txtDisplay(i) = "1" Then txtDisplay(i).BackColor = vbRed If txtDisplay(i) = "2" Then txtDisplay(i).BackColor = vbYellow If txtDisplay(i) = "3" Then txtDisplay(i).BackColor = vbBlue If txtDisplay(i) = "4" Then txtDisplay(i).BackColor = vbGreen txtDisplay(i).ForeColor = vbBlack txtDisplay(i).Enabled = False Next i Case 3 For i = 24 To 31 If txtDisplay(i) = "1" Then txtDisplay(i).BackColor = vbRed If txtDisplay(i) = "2" Then txtDisplay(i).BackColor = vbYellow

Page 80: Jameson Inn, Inc

80

If txtDisplay(i) = "3" Then txtDisplay(i).BackColor = vbBlue If txtDisplay(i) = "4" Then txtDisplay(i).BackColor = vbGreen txtDisplay(i).ForeColor = vbBlack txtDisplay(i).Enabled = False Next i End Select End Sub Public Sub changeBackGroundToWhite() Dim i As Integer For i = 0 To 31 txtDisplay(i).Enabled = True txtDisplay(i).BackColor = vbWhite txtDisplay(i).ForeColor = vbWhite Next i End Sub