rdh_mu
06-02-2003, 01:18 PM
I have an Access database whose current purpose is to be an image gallery.
How do I get better control over the next and previous buttons?
I want to compare the Rs("school").value recordset, which is the name of a shool, with the name of the school in the recordset right after it in the database.
If the two school names are the same then I want the user to hyperlink to the next recordset. However, if the two school names are different I do not want them to advance to the next recordset.
<table cellpadding=2>
<tr><th width="50%" colspan="3"></th></tr>
<tr> <td><div align="center">
<%if iPageCurrent > 1 then%>
<a href="gallery-e.asp?pageNumber=<%=iPageCurrent - 1%>">Previous Page</a>
<%else%>
<span class="submenutitles">Previous Page</a>
<%end if%>
</div></td>
<td><div align="center">
<%if Rs("school").value <> Rs("school").value then%>
<span class="submenutitles">Next Page</a>
<%else%>
<a href="gallery-e.asp?pageNumber=<%=iPageCurrent + 1%>">Next Page</a>
<%end if%>
<%else%>
<a href="gallery-e.asp">Next Page</a>
<%end if%>
</td></div>
</tr>
</table>
How do I get better control over the next and previous buttons?
I want to compare the Rs("school").value recordset, which is the name of a shool, with the name of the school in the recordset right after it in the database.
If the two school names are the same then I want the user to hyperlink to the next recordset. However, if the two school names are different I do not want them to advance to the next recordset.
<table cellpadding=2>
<tr><th width="50%" colspan="3"></th></tr>
<tr> <td><div align="center">
<%if iPageCurrent > 1 then%>
<a href="gallery-e.asp?pageNumber=<%=iPageCurrent - 1%>">Previous Page</a>
<%else%>
<span class="submenutitles">Previous Page</a>
<%end if%>
</div></td>
<td><div align="center">
<%if Rs("school").value <> Rs("school").value then%>
<span class="submenutitles">Next Page</a>
<%else%>
<a href="gallery-e.asp?pageNumber=<%=iPageCurrent + 1%>">Next Page</a>
<%end if%>
<%else%>
<a href="gallery-e.asp">Next Page</a>
<%end if%>
</td></div>
</tr>
</table>