I have a query which passes on values to a report. The criteria used for the query changes depending on what options the user selects in a user form. I'd like to create the query in VBA so that I can use IF, THEN, ELSE to determine what set of criteria to use. If someone has a code to do this please share.