I am not sure this will help, but the only way I can think of it to link the 2 parameters together.
In your example make the values for the B parameter dependent upon the selection of A by populating the values of B with the results of a query where A is a filtering criteria. If the parameters are completely independent then I don't think this will work.