Can't figure out what is happening here. I have a form with a recordset based on a query. If I set the OrderBy (with OrderBY on load true) in design mode, the order of the records on the form is correct. However, I wanted to set the OrderBy in VBA. When I do this (and clear the value in design mode), it totally ignores the sort order I have just set (in the Form Open Event code). In fact the sort order it is using seems to be some saved sort order based on an older version of data in my table.
(i.e. I had two records in the wrong order, so I changed them, but the form was still sorting based on the records in the wrong order).
Hope this makes sense.
Put simply, does it work to set the OrderBy in VBA, or do you have to do something else as well?