K
Krechting
Hi All,
I tried to read the value of a textbox in another form.
I have a page which contains one record. The textbox "txtWID" contains
the autonumber of the record. I want to read this value in a new page
so
I can set a WHERE for my query:
Dim eben
session("txtWID")=request("txtWID")
eben = request("txtWID")
SQL = "SELECT Weapon.WID AS Weapon_WID, Weapon1.name AS Weapon1_name
" & _
"FROM (WeaponsPerWeapons INNER JOIN Weapon ON
WeaponsPerWeapons.WID = Weapon.WID) INNER JOIN Weapon Weapon1 ON
WeaponsPerWeapons.Weapon = Weapon1.WID"
CountSQL = "SELECT COUNT(*) " & _
"FROM (WeaponsPerWeapons INNER JOIN Weapon ON
WeaponsPerWeapons.WID = Weapon.WID) INNER JOIN Weapon Weapon1 ON
WeaponsPerWeapons.Weapon = Weapon1.WID"
Where = "Weapon.WID = " & eben
Order = "Weapon1.name"
session("txtWID") = ""
This is however not working because I use an imagelink to go to the
new page.
There is no way to put the value of the txtWID into the URL of the
link image.
I tried something like href="weapon_related.asp?<%=.....%>" but that
doesn't work. If I write "href=weapon_related.asp?26" then I can
translate this for the
WHERE clausule but I want to get the value of the autonumber field
since it's
never the same.
This would then work eben = Replace(Request.QueryString,"%20"," ")
Where = "Weapon1.WID = " & eben
What is my mistake
Regards
MArco
I tried to read the value of a textbox in another form.
I have a page which contains one record. The textbox "txtWID" contains
the autonumber of the record. I want to read this value in a new page
so
I can set a WHERE for my query:
Dim eben
session("txtWID")=request("txtWID")
eben = request("txtWID")
SQL = "SELECT Weapon.WID AS Weapon_WID, Weapon1.name AS Weapon1_name
" & _
"FROM (WeaponsPerWeapons INNER JOIN Weapon ON
WeaponsPerWeapons.WID = Weapon.WID) INNER JOIN Weapon Weapon1 ON
WeaponsPerWeapons.Weapon = Weapon1.WID"
CountSQL = "SELECT COUNT(*) " & _
"FROM (WeaponsPerWeapons INNER JOIN Weapon ON
WeaponsPerWeapons.WID = Weapon.WID) INNER JOIN Weapon Weapon1 ON
WeaponsPerWeapons.Weapon = Weapon1.WID"
Where = "Weapon.WID = " & eben
Order = "Weapon1.name"
session("txtWID") = ""
This is however not working because I use an imagelink to go to the
new page.
There is no way to put the value of the txtWID into the URL of the
link image.
I tried something like href="weapon_related.asp?<%=.....%>" but that
doesn't work. If I write "href=weapon_related.asp?26" then I can
translate this for the
WHERE clausule but I want to get the value of the autonumber field
since it's
never the same.
This would then work eben = Replace(Request.QueryString,"%20"," ")
Where = "Weapon1.WID = " & eben
What is my mistake
Regards
MArco