I've tried a few different variations with no luck, usually just filtering by the 'Title' search and it completely ignores the Date Pickers. Can't quite get my head around how to merge these codes together, any ideas?
@AlexanderUK As far as I can tell, you have four conditions, 1 Both datepickers have selected dates, 2 Only the start datepicker has a selected date,
3 Only the end datepicker has a selected date,
4 Neither datepicker has a selection. I found it easier to think about the problem from the standpoint of which datepickers have a selection rather then which ones are empty. The solution below used the With() function to do an initial filter on the cases based on the Textbox search and the sort is done at that level. Then, the resulting sorted and filtered table (_cases) is then further filtered in a second stage according to the datepickers. Only one If() is needed because the logic proceeds until a true condition is found and then it stops and performs the filter.