Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing a parameter

Status
Not open for further replies.

Mary10k

IS-IT--Management
Nov 8, 2001
103
US
I have a tree menu which displays a list of fields from my table. I would like the users to click on an item from the menu and then have the system generate code to pull the corresponding information from the database and display it on the same form, different table.

Example: user clicks on Order, I would like order id, name and date to be pulled from the database.

How can I do this as there are multiple items in my tree and I am not sure how to pass the clicked item to a SQL statement.

Thank you.
 
If you output the items into the tree as links then you could fairly easily create links with extra values in the querystring that could be used to build the next query. Not sure what your using for a treeview, but I'm thinking it probably gives you the option to set the tet for each item. So in this case you would want to set it to something like:
Code:
aStr = "<a href=""myPage.asp?id=" & myRs("idField") & """>" & myRs("textField") & "</a>"

on the next page you would then receive a field in the Request.Querystring collection called id with the the value of the Id that corresponds to the text that was clicked i nthe link. So at this point you can concatenate it into your SQL statement and get further details on that specific field.

hope that helps,
-T
[/code]

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top