E
Ed Richter
I have a form that depending on criteria selected, displays certain records in a table. Everything was working fine. However, I'd like to add a field to the form to allow a user to select a criteria from that field to have the results sorted by. For example the person may want to sort by last name, phone number, etc. What I tried to do was replace the part of the "standard" query that it would specify what field to sort by, originally for example: ORDER BY L_name ASC and replace that with a variable called sort_order: ORDER BY '" & sort_order & "' ASC where sort_order was the field on the form.
The results being returned are not correct and I'm guessing that it doesn't appear that I've formatted the statement correctly to do this?? How can I utilize a variable sort order?
The results being returned are not correct and I'm guessing that it doesn't appear that I've formatted the statement correctly to do this?? How can I utilize a variable sort order?