I have an application with a portion that essentially acts as a contact manager. After a new contact is added the data is save in the database and the page reloads to clear the values in order to except new values for the next contact to add. This method has worked fine. Now I want to persist some values from the last contact to the new entry form. One of the fields is a dropdown list populated from a database table.
This is a portion of the code:
<%
strSQL1 = "SELECT areaID, areaName FROM Areas ORDER BY areaName"
Set getRSRecords = nothing
Set getRSRecords = conn.Execute(strSQL1)
getRecords = getRSRecords.getRows
numRows = ubound(getRecords, 2)
%>
<select name="areaID">
<option value="">( Select an Area )</option>
<% for counter = 0 to numRows %>
<option value="<% =getRecords(0, counter) %>"><% =getRecords(1, counter) %></option>
<% next %>
</select></font><br>
I’ll admit I’ve tried a few things with out any successes and any input will be greatly appreciated.
Thank you!
This is a portion of the code:
<%
strSQL1 = "SELECT areaID, areaName FROM Areas ORDER BY areaName"
Set getRSRecords = nothing
Set getRSRecords = conn.Execute(strSQL1)
getRecords = getRSRecords.getRows
numRows = ubound(getRecords, 2)
%>
<select name="areaID">
<option value="">( Select an Area )</option>
<% for counter = 0 to numRows %>
<option value="<% =getRecords(0, counter) %>"><% =getRecords(1, counter) %></option>
<% next %>
</select></font><br>
I’ll admit I’ve tried a few things with out any successes and any input will be greatly appreciated.
Thank you!