I'm a major newbie with ASP and VB Script, and am hoping for some assistance with the following:
When I run a query on a MS Access Database, and there are no records returned in the recordset, I received an error page. How would I change this code to instead, display a message on the page "Address was not found in our database, click here to try again" and using the "click here" part as a hyperlink back to the first page. Here is my loop
the creates a table filled by the recordsets found (if any).
<form action="GetPlace.asp" method="post">
<select name="AddrDown">
<% 'Loop through the recordset, creating a list item
for each.%>
<% do while not rstSearch.eof%>
<Option Value="<%= rstSearch.Fields("PRP_ADDR"
.Value %>">
<%= rstSearch.Fields("PRP_ADDR"
.Value %>
</Option>
<%rstSearch.movenext
loop%>
</select>
<input type="submit" value=Submit>
</form>
Hopefully, I've given you enough info to go on, to help me out. Thanks!!!
When I run a query on a MS Access Database, and there are no records returned in the recordset, I received an error page. How would I change this code to instead, display a message on the page "Address was not found in our database, click here to try again" and using the "click here" part as a hyperlink back to the first page. Here is my loop
the creates a table filled by the recordsets found (if any).
<form action="GetPlace.asp" method="post">
<select name="AddrDown">
<% 'Loop through the recordset, creating a list item
for each.%>
<% do while not rstSearch.eof%>
<Option Value="<%= rstSearch.Fields("PRP_ADDR"
<%= rstSearch.Fields("PRP_ADDR"
</Option>
<%rstSearch.movenext
loop%>
</select>
<input type="submit" value=Submit>
</form>
Hopefully, I've given you enough info to go on, to help me out. Thanks!!!