Clicking a record in a search result using HTML form
Hi,
I have a problem when I want to search my database using a HTML form which results in multiple answers. I get a list of the correct answers but then when I want to click one of the records to view the details (master/detail relationships), the list goes back to the initial list of functions, which is loaded automatically when no search is performed (select * from....).
Two other objects (MyDb2, MyDb3) use the exported session variable "Functienaam" in the SQL statement.
To illustrate the problem (because it's pretty vague) I'll supply a part of the source code:
<%
Set MyDb = Server.CreateObject("AspDB.Free")
MyDb.dbUnit = 305
Mydb.dbGridInc=-1
MyDb.dbDSN = "ggl32"
MyDb.dbSQL = "Select * from ggl32_main"
If Request("categorie") <> "" then
MyDb.dbSQL="SELECT * FROM ggl32_main WHERE Categorie = '" & Request
("categorie") & "'"
Response.Write("<script language=javascript>
document.catform.categorie.value='")
Response.Write(Request("categorie"))
Response.Write ("'</script>")
End If
If Request("Zoek") <> "" then
MyDb.dbSQL="SELECT * FROM ggl32_main WHERE Functienaam LIKE '" &
Request("Zoek") & "'"
End If
MyDb.dbmode="dual"
MyDb.dbGridDisplayflds="1,2,4,5"
MyDb.dbFormDisplayflds=-1
MyDb.dbExportFlds = "Functienaam"
MyDb.dbFormMemo = "3x90,omschrijving,opmerkingen"
MyDb.dbNameMap="Omschrijving, Omschrijving Functie"
MyDb.dbColor="99FF99,FFFFFF,00CC00,000000"
MyDb.dbNavigationItem="top,prev,next,bottom 4;
MyDb.dbImageDir="images/"
MyDb.dbNavigationIcon="std"
MyDb.dbGridTableTag="BORDER=0"
MyDb.dbButtonAnchor=False
MyDb.dbStatusbar=false
MyDb.aspDBFree
%>