the 3rd case has the wrong value, but it should work! generally a case statement is more efficient than a big IF block. For a multiple decision flow like you have, then I would more than 99% select a case over an IF.
-----Original Message----- From: Robertson-Ravo, Neil (REC) [mailto:[EMAIL PROTECTED]] Sent: 07 October 2002 11:12 To: CF-Talk Subject: RE: Need more coffee - help with CFIF logic please... A Case statement would be more logical : <cfswitch expression="#cfformfield#"> <cfcase value="20101-23217,23290-24658" delimiters=","> DO THIS </cfcase> <cfcase value="27060-28909"> DO THIS </cfcase> <cfcase value="27060-28909" > DO THIS </cfcase> <cfcase value="23218-23298"> DO ERROR MESSAGE ONE </cfcase> <cfdefaultcase> SHOW ERROR MESSAGE TWO FOR ALL ELSE </cfdefaultcase> </cfswitch> -----Original Message----- From: Les Mizzell [mailto:[EMAIL PROTECTED]] Sent: 07 October 2002 11:00 To: CF-Talk Subject: Need more coffee - help with CFIF logic please... Trying to evaluate and assign various stuff depending on a zip code coming from a cfform field. Basically: If the zipcode is 20101-23217 or 23290-24658 do thing ONE If the zipcode is 27060-28909 do thing TWO If the zipcode is 23218-23298 show error message ONE All other Zip Codes, show error message TWO Suggestions as to the best way to construct this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com