Use a dropdown to dynamic sort records
What i want to do is to have a dropdown that let's users sort a recordset.
For example: newest first, oldest first, Name A-Z, Name Z-A
So my idea was to set a session variable with the values from the dropdown list on change, having the dropdown in a form and submit that form on change.
Example of the dropdown:
Label: Newest first Value: Date DESC (where Date is the column name to sort)
(This works and sets the correct values in the session variable)
Then add a variable called "Sorter" in the recordset query that reads the session variable and use that variable like this: ORDER BY Sorter
expecting the recordset would be sorted by the value in the session variable.
That's where I got stuck now as the sorting doesnt works.
Did I choose a complete wrong approach or did i miss to pay attention to some detail?