Dear all,

After dozens of attempts, the most I got was this code Are 2 asp files

The choice of one item in the html file opens the database and displays the records that match.

It does not separate the match records. And I do not know how to replace the submit button for the onchange command.

This is my 2 codes:

First ASP file:
<%
dim oconn
dim ors1, ors2
dim counter, matches
Server.ScriptTimeout = 5000000

set oconn=Server.CreateObject("ADODB.Connection")
oconn.Provider="Microsoft.Jet.OLEDB.4.0"

oconn.Open(Server.Mappath("DATA1.mdb"))
set ors1=Server.CreateObject("ADODB.recordset")

Dim strKeyword
'' strKeyword = split(Trim(Request.QueryString("look_for")), " ")
strKeyword = Request.QueryString("look_for")

%>

<%

oRs1.open "SELECT distinct str_start FROM TABLE3 order by str_start", oconn
%>
<FORM id="look_for" action="postnew.asp" method="get" >
<SELECT>
<%
while not oRs1.BOF and not oRs1.EOF
%>
<OPTION name="look_for" size=150 ><%=oRs1("str_start")%></OPTION>
<%
oRs1.movenext
wend
%>
</SELECT></tr>
<input type=submit value=submit id="look_for">
</form>
<%
oRs1.close
%>
CODE 2

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "E:\web\public_html\programs\phrasenet.com\asp\DATA1.mdb"

Dim strKeyword
'' strKeyword = split(Trim(Request.QueryString("look_for")), " ")
strKeyword = Request.QueryString("look_for")


set rs=Server.CreateObject("ADODB.recordset")

rs.Open "Select texts1 from Table3 where str_start like '%' & texts1 & '%' ", conn

%>

<SELECT>

<%
while not Rs.BOF and not Rs.EOF

%>
<OPTION size=100 value=<%=Rs("table3.texts1")%>><%=Rs("table3.texts1")%></OPTION>

<%
Rs.movenext
wend

%>
</SELECT>
Thank you in advance