This is one Access form with two buttons and a single combo box
It creates a record set, uses the record set to populate an Excel worksheet.
I always use a centralized error tracking function to log errors in a common Access table.
I left a larger than necessary SQL statement to indicate how complex it can get. Myself, I typically use SQL Server (Access Linked Tables) views, then finish the linkage of several SQL Server Views from here.
For complex queries, you should also explore Pass-Through queries or other options. For fairly simple queries, this might give you a nice baseline to start.
Bookmarks