Thanks for all the help. I found another solution in another
forum. Since the query fails it's not populating a record count. I
had to go back to the CFTry and relable the query. THis code works
-
<cftry>
<cfquery name="all" datasource="hr1">
Select EMPLID, COURSE_TITLE
From TRAINING
WHERE EMPLID='#FORM.EMPLOYID#'
And COURSE_TITLE like '#FORM.CLASS#%'
</cfquery>
<cfcatch type="database">
<cfset all = QueryNew(EMPLID)/>
</cfcatch>
</cftry>
Then using the recordcount feature it outputs the correct
response
<cfoutput query="all">
<cfif all.recordcount GTE 1>
<cfmail to="email@someplace" from="email@someplace"
subject="Please unenroll">#form.employID# wishes to remove from
the course #COURSE_TITLE#</cfmail>
You selected to unregister for
<em>#COURSE_TITLE#</em>. An email has been sent to your
supervisor.
<cfelse>
Our records do not show that you registered for this course.
<a href="dumppage.cfm">Please select another</a>.
</cfif>
</cfoutput>