I'm trying to create a form/report combination that will allow my users to select items in combo boxes on the form that will define the sort order(s) on the report. I can use the CreateGroupLevel function to make a new sort level and the .SortOrder or .ControlSource to modify an existing sort level.
Unfortunately, there will be times when a user will only want the report to be sorted on a single field (or not sorted at all). I've been able to use the .ControlSource function to delete the sort field, but I don't know how to get rid of the Sort Order function. So I end up with a Sorting and Grouping box that has a null value for the sort field, but an ascending value for the sort order. This causes an error and the report fails to open.
Is there some way to use Access VBA code to delete an entire row from the Sorting and Grouping tool? Or to clear the Sort Order function?
My apologies if this already in an existing post. The search function doesn't seem to be working and I don't have the time to scan through all the posts.
Unfortunately, there will be times when a user will only want the report to be sorted on a single field (or not sorted at all). I've been able to use the .ControlSource function to delete the sort field, but I don't know how to get rid of the Sort Order function. So I end up with a Sorting and Grouping box that has a null value for the sort field, but an ascending value for the sort order. This causes an error and the report fails to open.
Is there some way to use Access VBA code to delete an entire row from the Sorting and Grouping tool? Or to clear the Sort Order function?
My apologies if this already in an existing post. The search function doesn't seem to be working and I don't have the time to scan through all the posts.