Link to home
Start Free TrialLog in
Avatar of Mark Drelinger
Mark DrelingerFlag for United States of America

asked on

Redirect with parameter if Recordset has only one record

I want to redirect a user if their recordset has only one result.  When they are redirected, I need to pass the url variable.  Otherwise, I will leave them on the results.asp page.  
This is the code I have so far, but it does not work:

<%
If rsCustomerData_total = 1 Then
Response.Redirect("ContactManagementActivityAdd.asp? & var_Table_ID=(rsCustomerData.Fields.Item("Table_ID").Value)")
End If
%>
Avatar of Big Monty
Big Monty
Flag of United States of America image

have a look at the recordCount property - http://www.w3schools.com/ADO/prop_rs_recordcount.asp
Avatar of Mark Drelinger

ASKER

any hints on syntax to include the required parameter in the url ?
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial