<% strLetter = request("Letter") ' Create a recordset object to store specific table information Set objRS = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From TblLogin where AgencyName like '" + strLetter + "%' and (AccessLevel = '2' or AccessLevel = '6') order by AgencyName" 'Set the recordset object equal to the SQL query string objRS.Open SQL, objADO, 1, 3 ' Create a recordset object to store specific table information Set objRS2 = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From TblAlphabet" 'Set the recordset object equal to the SQL query string objRS2.Open SQL, objADO, 1, 3 %>

DEALER SEARCH

Agents By Alphabetical Listing: <%= strLetter %>
<% while not objRS2.EOF %> <% objRs2.MoveNext %> <% wend %>
"><%= objRS2("Alphabet") %>
<%= objRs.RecordCount %> Dealers Listed in Alphabetical Order.

<% if not objrs.EOF then %> <% while not objRs.eof %> <% objRs.movenext %> <% wend %>
  Name   Phone   City   State   View Listings
"><%= objRs("AgencyName")%> <%= formatPhoneNumber(objRs("PhoneNumber")) %> <%= objRs("City") %> <%= objRs("State") %> ">My Listings
<% else %>

Currently we do not have dealers whose last name begins with <%= strLetter %>. New dealers are always being added. Please check back again soon. <% end if %>