My form has controls that run queries when clicked. I would like to cut down the number of queries by passing the name of a field to the query, i.e. I'd like to run the same query for multiple controls but varying the field it uses as criteria based on the form control. I tried to pass the name via a text box. It works to a point but asks me for the parameter, which I defined in the VBA code (so it's not passing it). I've tried using IIf as well which does works, but only for one field. I tried using 'else' and 'or' with the IIF in the field line of queries, but got an error.
Any suggestions?
Any suggestions?