MS Access: ORDER BY a value in a form
Posted: Thu Jul 15, 2004 3:46 am
I have a search query that depends on values in a form.
I want the user to be able to choose how to order the results.
On the form, I have a combo box with column names from the table. The query ends in:
Where [Forms]![Search records]![Order by] refers to the combo box.
However, everything comes out unsorted, since Access doesn't want to see this paramter as the title of a column. (I've tried with column numbers too: same effect.)
Any way around this?
I want the user to be able to choose how to order the results.
On the form, I have a combo box with column names from the table. The query ends in:
Code: Select all
ORDER BY [Forms]![Search records]![Order by];
However, everything comes out unsorted, since Access doesn't want to see this paramter as the title of a column. (I've tried with column numbers too: same effect.)
Any way around this?