Sort By

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??
 
M

MD Websunlimited

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??
 
Top