You can dynamically generate the SQL string, which solves the issue of specifying the name of the output table. If you want you can use the QBE window to generate the SQL for you; just write the query the way you want it and look at the SQL view (same place as design view or data view).