Sort By

  • Thread starter Thread starter Ed Richter
  • Start date Start date
E

Ed Richter

I have a form that I'd like to add a radio button to give people the option to sort by. I can capture the value of the radio button by statement:

Sort_Choice = Request.Form("Sort_Choice")
where the Sort_choice is the value of the radio button. What I'd like to do then in my query statement is order based on the value of sort choice

Is there away to add into the end of my query statement:

ORDER BY Sort_choice (and if so, how do I format it??)

Can't seem to be able to add a variable into my query statement??
 
Hi Ed,

You can accomplish it the same way you'd do field value substitution use ::Sort_Choice::


--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Create fast, better scaling link bars with CSS Menu Maker
http://www.websunlimited.com/order/Product/CssMenu/css_menu.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible


I have a form that I'd like to add a radio button to give people the option to sort by. I can capture the value of the radio button by statement:

Sort_Choice = Request.Form("Sort_Choice")
where the Sort_choice is the value of the radio button. What I'd like to do then in my query statement is order based on the value of sort choice

Is there away to add into the end of my query statement:

ORDER BY Sort_choice (and if so, how do I format it??)

Can't seem to be able to add a variable into my query statement??
 

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

Back
Top