<% Sub GetState dim con dim rs strDBPath =request.servervariables("appl_physical_path") set con=server.createobject("adodb.connection") conStr = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & strDBPath & "zips.mdb" con.ConnectionString = conStr con.open Set rst=Server.CreateObject("ADODB.recordset") strStateChoices = "" ' Get the data for the State pulldown set rst=server.createobject("adodb.recordset") strSQL = "select distinct StateCode, StateName from DealerLocations DL inner join StateNames SN on DL.State=SN.Statecode order by Statecode " set rst=con.execute(strSQL) 'Now get all of the State codes from the result of the query and put them in the list counter = 0 do while not rst.eof if (rst.fields("statecode") <> "") then counter = counter + 1 if (counter = 1 ) then SLCT = " SELECTED " else SLCT = "" end if strStateChoices = strStateChoices & " " & "" end if rst.movenext loop response.write(strStateChoices) rst.close End Sub %> Locate a WOOD LOGIC Dealer by State

Locate a Dealer by State

Select a State: