Compare db entry with dynamic text on asp page

S

Simon Gare

Sorry I not making it clear,

If the dynamic filed on the asp page from recordset 1 was, for example,
London I neeed the code below to match 'London' to a list of entries in
Recordset 2 and return a row background colour based on the match. Recordset
2 is another table with a list of towns only.

<tr
<%
Record = Recordset1.Fields.Item("COLL_CITY_TOWN").Value
Record2 = Recordset2.Fields.Item("TOWN").Value
If Record = Record2 Then
strbgcolor="#FFCC66"
Else
strbgcolor="silver"
End If
%>
bgcolor="<%=strbgcolor%>">

Regards
Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top