I need to sort a report based on a field the user inputs and I can't seem to find an easy way to do it. I tried making the ORDER BY clause of the query a parameter but Access didn't like that. I tried building the entire query in code and then basing the report on a form field which contained the string for the query, but it woudln't recognize it. Since that seems to be the most likely solution, though, how do I base a report on a query built in code?