Ok. This one might be an intresting one.
What i'm trying to do is have a form.
In that form there is a combo box that lists all the queries in the database, let's call it cboX.
I also have a button, lets call it cmdExportToExcel.
What I am trying to attempt is when a query is selected from the dropdown and the button is clicked I want it to export that query to excel.
The way I was thinking of doing it is to run an SQL statement that builds a make table query on the fly with the query in the cboX as a variable so it knows which query to use and then have it export to excel the now made table but I can't seem to figure out what the SQL statement should look like or if there is a better way to accomplish this.
Thank you.
What i'm trying to do is have a form.
In that form there is a combo box that lists all the queries in the database, let's call it cboX.
I also have a button, lets call it cmdExportToExcel.
What I am trying to attempt is when a query is selected from the dropdown and the button is clicked I want it to export that query to excel.
The way I was thinking of doing it is to run an SQL statement that builds a make table query on the fly with the query in the cboX as a variable so it knows which query to use and then have it export to excel the now made table but I can't seem to figure out what the SQL statement should look like or if there is a better way to accomplish this.
Thank you.