Unanswered: Can I use Query/s to Sort Records by Fields listed in Combo Box in Data Access Page?
I've been browsing the forum to see if anyone has posted anything about sorting records in order using a Combo box to designate the field to sort by, e.g. date, record ID number, Department, Status, etc.
I found a lot of 'filtering' posts, but no concrete solutions for sorting.
Also, I'd better try to confirm if such a thing is actually possible in a Data Access Page (as this is what I'm using to display the records).
Can anyone confirm this is possible in a DAP, and I'd be very grateful if someone could post or point me in the direction of an example of such a Combo Box with it's values set to corresponding queries that will sort the records based on the fields in the Combo Box!!!
Much appreciated if anyone can shed some light on this for me!!
i don't know a way to do this directly with a saved query (...in the same way that you can set criteria to look at a text-box).
you could mess with the querydef but there doesn't seem to be much point: easier is to abandon the saved query and use SQL directly adding:
strSQL = strSQL & "ORDER BY " & forms!myForm!myCombo.value & ";"
to the tail of your SQL (...generated in A's query grid if you are feeling lazy)