Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to have an range error message that says please enter values from 0-30 . Right now the code shows the error

I am trying to have an range error message that says " please enter values from 0-30" . Right now the code shows the error message but still adds the value of the application even if the value is greater or less than 30 . Where should the line of statement be in code so it just shows that error message? Or how can I change my code so that it shows that message? image text in transcribed
Humber of floors Click Const intFLOORS As Integer Total number of rooms on all floors const int-TOTAL-ROOS As Integer t ntFLOORS . ntROOS Hold the overall occupancy rate for all rooms and floors Dim dbloveralloccupancyRate As Double -.e . Din dbl TextOccupied AsDouble - Private Sub btnExit click(sender As object, e As EventArgs) Handles btnExit.click close the application He.CloseO End Sub Private Sub btnsave_Click(sender As object, e As EventArgs) Handles btnSave.Click declare the variables of integers and double types Dim intRoomsOccupied As Integer Dim dbloccupancyRate As Double If Integer.TryParse(txtoccupied. Text, intRoomsoccupied) Then If val(txtoccupiedText> 39 Then MessageBox.Show"Please enter values from e-38) intTotalRoomsoccupiedint Roomsoccupied dblOccupancyRate intRoomsOccupied intROOMS displat the results in the listboc istoccupancyRate. Items. Add("Floor:" & cboFloor. Text & "Rooms Occupied :" & tRoonsoccupied. ToString &-occupancy Rat calculate the overall occupancy rate for all the floors dbloverall0ccupancyRate intTotalRoomsoccupied int TOTAL ROOPS display the results to the user txtTotalRooms.Textint TotalRoomsoccupied. ToString) txtoccupancyRate.Text dbloveralloccupancyRate.Tostring"p) If cboFloor.SelectedIndex

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

Discuss the need to split the dataset into training and test data.

Answered: 1 week ago

Question

How flying airoplane?

Answered: 1 week ago