I have attached a modified version of the database.
This time just try using your form and subform (not my new form). The only criteria that I have made work is the Reference field. With no more data than I had to work with I did not take the filtering any further.
I did change from having the command buttons to run macros to using VBA code. I think you will need to use VBA because of some of the assigning of your criteria and creating the string that you would use as the "Filter" for the sub form.
HTH
This time just try using your form and subform (not my new form). The only criteria that I have made work is the Reference field. With no more data than I had to work with I did not take the filtering any further.
I did change from having the command buttons to run macros to using VBA code. I think you will need to use VBA because of some of the assigning of your criteria and creating the string that you would use as the "Filter" for the sub form.
HTH