The following code is supposed to use the data in the attatched file to generate a list of relavent houses available based on the specifacations that you enter. After I enter my prefered search method I can't get it to stop asking me how many bed/bathrooms or what price i want to search for. Could you guys help me out?
Here is the code:
'Ananda Bennett
'11/06/2006
'HHSS
OPEN "c:\homes.txt" FOR INPUT AS #1
PRINT"************************************"
PRINT"* 1 - Search by number of bedrooms *"
PRINT"* 2 - Search by number of bathrooms*"
PRINT"* 3 - Search by price *"
PRINT"************************************"
INPUT "What would you like to search for homes by?: "; schoice
CLS
DO WHILE EOF(#1) <> -1
INPUT #1, address$, city$, state$, proptype$, bedrooms, bathroom, price
SELECT CASE schoice
CASE 1
INPUT "How many bedrooms would you like to search by?; "; bedquant
IF bedquant = bedroom THEN
PRINT "Address: "; address$
PRINT "City: "; city$
PRINT "State: "; state$
PRINT "Prop. Type: "; proptype$
PRINT "Bedrooms: "; bedrooms; "Bathrooms: "; bathrooms; "Price: "; price;
PRINT "-----------------------------------------------------------------"
END IF
CASE 2
INPUT "How many bathrooms would you like to search by?; "; bathquant
IF bathquant = bedroom THEN
PRINT "Address: "; address$
PRINT "City: "; city$
PRINT "State: "; state$
PRINT "Prop. Type: "; proptype$
PRINT "Bedrooms: "; bedrooms; "Bathrooms: "; bathrooms; "Price: "; price;
PRINT "-----------------------------------------------------------------"
END IF
CASE 3
INPUT "What price would you like to search by?; "; prices
IF prices = price THEN
PRINT "Address: "; address$
PRINT "City: "; city$
PRINT "State: "; state$
PRINT "Prop. Type: "; proptype$
PRINT "Bedrooms: "; bedrooms; "Bathrooms: "; bathrooms; "Price: "; price;
PRINT "-----------------------------------------------------------------"
END IF
END SELECT
LOOP
Ananda:twisted:
anandarose 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.