Click to See Complete Forum and Search --> : Check a recordset has something in it


screaming_banjo
06-16-2005, 11:07 AM
I would like a button to appear only if the recordset has something in it, it's my understanding that if the recordset has nothing in it then it sets both the eof and bof are set to true. I would only like the input button to appear if the recordset has something in it. So I have this code:

<% IF rsAction.eof and rsAction.bof THEN %>
<!-- DO NOTHING -->
<% Else %>

<input name="CmdUpdate" type="submit" id="cmdAddAction" value="Update Action" class="buttonstyle" title="Click to add Action Taken">
<% END IF %>

My button still isn't there....presumably I'm going about this the wrong way and there is a better more efficient way to do it, i.e., one that works!

Thanks in advance for any help!

screaming_banjo
06-16-2005, 11:13 AM
It's okay I had a syntax error which I've now fixed (also edited post to show the correct code), just in case anyone else is looking to see how to do this.

Moderators: Feel free to delete this one....sorry!