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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query-on-Query..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,
I have a selfposting page with a listbox and a entryfield to create some simple queries to a table.
The user selects a fieldname and a criteria and gets the result.
What I want to do is to store the variables for the first search to be part of the second search and so on.
The result is sort of a Query-on-Query.

Example:
******************
If len(Entryfiled1)<1 then
query= &quot; where &quot; & Fieldname & &quot;=&quot; & Criteria
else
query=query & &quot; and &quot; & Fieldname & &quot;=&quot; & Criteria
end if
******************
I had an idea to store the value in 'Query' a hidden entryfield on the page. How can I send to a hidden entryfield?

... but that doesn't seems like a elegant solution.
It must be possible to store this on the serverside.
How can I do this?

/Kent J.

[sig][/sig]
 
To use server-side variables:

set it with: Session(&quot;myVariable&quot;)=myVariable

retrieve it with: myVariable=Session(&quot;myVariable&quot;)



To use a hidden field (less server resources needed)...

set it with: document.forms.formname.hiddenfieldname.value = myVariable

retrieve it with: myVariable = Request.Form(&quot;hiddenfieldname&quot;)

Hope this helps,
[sig]<p>Rob<br><a href=mailto:robschultz@yahoo.com>robschultz@yahoo.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
"Focus on the solution to the problem,<br>
not the obstacles in the way."<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top