Hi there,
If I understand your problem correctly, it's caused by the fact you are not submitting your page to the server.
Your second recordset tries to retrieve information using the drop-down as a filter. However, Request.QueryString("open") runs at the server, and not at the client.
If the page loads the first time, it will write out the drop down, and then immediately proceed with the second recordset.
Here's what you need to do to fix it:
1. Add an onchange handler to the drop down. Add some code to it that automatically submits the form to the server using something like: document.openedticket.submit();
2. On the server, check whether the QueryString has a value. If it does, it means the form has been submitted to the server, so you can construct your second recordset, like this:
Code:
<%
If Request.QueryString("open") & "" <> "" Then
' There is a QueryString, so get the record
Set rs = Server.CreateObject("ADODB.Recordset")
strST = Request.QueryString("open")
strSQL = "SELECT * FROM ticket WHERE PSAP = '" & strST & "'"
' Open Recordset Object
rs.Open strSQL, conn, adOpenStatic
%>
This way, the second code block will only run when the form has been posted back to the server.
Does this help?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.