Thanks all. RL Smith
----- Original Message ----- From: "Jochem van Dieten" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Saturday, December 22, 2001 10:05 AM Subject: Re: RecordCount EQ 0 Problem > Richard L Smith wrote: > > > Hello, > > > > I am using the following code to display a message based > > on the RecordCount variable's value. Everything works ok > > as long as the query returns some records. However when it > > is zero no message displays, nothing. I am getting no errors > > so i don't think it's syntax related? > > > > <cfoutput query="qSearchIt" maxrows="1"> > > Your search for, #SearchIt# found #qSearchIt.RecordCount# items: > > <cfif qSearchIt.RecordCount IS 0> > > Sorry no records found for, #SearchIt# > > <cfelse> > > </cfif> > > </cfoutput> > > The entire cfoutput block is skipped when there are no records returned. > You should use something like: > > <cfoutput> > Your search for, #SearchIt# found #qSearchIt.RecordCount# items: > <cfif NOT qSearchIt.RecordCount> > Sorry no records found for, #SearchIt# > </cfif> > </cfoutput> > > Jochem > ______________________________________________________________________ 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/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

