I have a bunch of reports that need to be output to Excel through code. The formatting is not important. The issue is that these reports are created by the user with specific data options and are opened with a WHERE clause and some data (mostly formatting) in OPENARGS.
DoCmd.OutputTo doesn't allow me to use a WHERE clause. Is the best option to use code to create and save a new query with the user choices and then use DoCmd.TransferSpreadsheet? Is there something else that would be easier?