Query parameters in combo box

G

Guest

Is it possible to have a combo box (i.e. drop down) that allows users to
select which set of records to look at, then pass that query parameter to the
database results area used to populate a second lookup drop down all on the
same page?

Example:
In first form DD1 (drop down 1) contains a list of choices like:
<option value="SELECT * FROM database WHERE (field2 =::1::) ORDER BY field1
ASC" selected>Choice 1</option>
<option value="SELECT * FROM database WHERE (field2 =::2::) ORDER BY field1
ASC" selected>Choice 2</option>
etc.

The value of that form, call it SELVAL, would then be passed to the second
form on the page that contains DD2 that's populated by a database.

Specifially, in DD2, instead of having

fp_sQry="SELECT * FROM database WHERE (field2 =::1::) ORDER BY field1 ASC"

I want that line to read fp_sQry="SELVAL"

When submitting the first form to the second the page tries to find results
based on the selection instead of changing the query in DD2.

Should these DD's be in the same form?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top