Stephen, You should be able to re-work your query to use the in function (where PropertyType IN ('#replace(form.propertytype, ",", "','", "ALL")#').
Also, you might try building a pseudo grouping into your loop inside the cfmail and take out the query parameter of the cfmail tag.... assuming that you only want one email generated per serarch, right? Hatton > <cfloop index="PType" list="#FORM.PropertyType#" delimiters=","> > > <cfquery name="SearchProperties" datasource="CMSX"> > > > SELECT PropertyID, > FullJobName, > PropertyType, > Tenure > FROM Properties > WHERE PropertyType = '#FORM.PropertyType#' > > <cfif IsDefined("FORM.PropertyInfo")> > > <cfif FORM.PropertyInfo NEQ > "Freehold,Leasehold"> > > AND Tenure = > '#FORM.PropertyInfo#' > > </cfif> > > </cfif> > > AND OnPrintedList = 1 > ORDER BY PropertyType, > FullJobName, > Tenure > > > > </cfquery> > > <cfmail query="SearchProperties" > to="[EMAIL PROTECTED]" > from="[EMAIL PROTECTED]" > server="mail.company.com" > port=25 > timeout=20 > type="HTML"> > > <cfloop query="SearchProperties"> > > <cfoutput> > <p> > <table> > > <tr><td>#SearchProperties.FullJobName#</td></tr> > > <tr><td>#SearchProperties.PropertyType#</td></tr> > > <tr><td>#SearchProperties.Tenure#</td></tr> > </table> > </p> > <hr> > </cfoutput> > > </cfloop> > > > </cfmail> > > </cfloop> > > Hope this helps, > > Cheers Stephen > > > > > ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists