My SetupReports form is based on my Reports table. The form basically works, and I can see the various reports in the list on left-hand side of form.
I am displaying the report name and the Seq field in the list. Everything works ok, except I want to sort the list by the Seq field rather than by Report Name. I can find no place to configure the sort order of the list.
Does the list sort automatically based on the first field in the list? I’d rather have the Seq field AFTER the report name field but still sort by Seq. If this is not possible, I can move the Seq field up above the report name in the Fields tab. Please advise.
To try and make this work myself, I created a query called GetReports, and included every field in the table but set the query to order by Seq. This works in the query design when I run it. I made the query LIVE. Then changed the data source of the form from Reports to GetReports query. The form still displays properly, and the list IS sorted properly, but when I click on a field in the form, nothing happens, as if the form is now read-only.
Please advise the proper way to sort the list, I can’t find that in the 2.7 docs. I can only find how to filter the list. Also, if possible, perhaps answer why the form is now non-editable if I use a query as its data source.
UPDATE: By moving the Seq field above the Report Name field in the fields list of the General page, it does indeed now sort the records in the proper order by Seq. However, the Seq column in the list is VERY wide, as wide as the Report Name field. This is a quite unpleasant visual effect. I can’t figure out how to change the width. At run-time, I can change it, but if I leave the form and come back it is wide again. I tried to change to 5, then to 1 in the display tab, but nothing helped. That only caused the display width of the field on the form to change instead of the list.
So to Recap:
1: Is there a simple way to sort the list by NOT the first field in the list?
2: If I must sort by the first field in the list, how do I change the column width in the list?
3: Is there a statement I can put at the end of my function to cause the list to refresh itself without having to exit the form and reopen it again?
Thanks…