Full Version: Sort a Continuous Records form by a checkbox field ?
UtterAccess Forums > Microsoft® Access > Access Forms
Hi All,
irst post on the weekend....I need to get a life...
Anyway, I have a continuous records form with a checkbox field that the user will use to tag records for actions to be taken later. A subform in the form footer totals only the tagged records. Since there are many more records in the form than can be seen at one time I want to user to be able to sort the form based on the checkbox field so that they can easily see what records they've tagged.
Odon't want to use a filter because I don't want to hide, even if only temporarily, records from the user. I also don't want to tell the user to just click in the checkbox and then click the native sorting buttons in the toolbar because when you click into the checkbox field it automatically changes the value of the field and I'm afraid the user will mistakenly tag/untag a file by using this method.
I had wanted to use a toggle button so that when you clicked once it would sort ascending and twice for descending...
Your thoughts ?
Answering posts on the weekend - I need to get a life .... laugh.gif
This should work.
If you have a query that is referencing the subform and filtered for the selected records, so it will only show selected records.
Then add a second subform near your selection subform. In the after update event of the check box, requery the selected subform query and the selected item(s) appear.
You will need to make the record not dirty first (not writing to it) so that the system see the record as selected.
Does this make sense / help?
You might find Fancy Sort in Continuous Forms helpful . . .
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.