View Full Version : Saving results of a query...


mickman17
09-18-2001, 04:42 AM
I need to archive the results of a query for a scheduling based system so that I can go back a view the results weeks later if necessary. Any help would be appreciated.

Ally
09-18-2001, 05:29 AM
What about making the query into a make-table query, then running it in a macro (or code) to avoid all the warnings? You would obviously need to go and change the name of the table afterwards, otherwise it would overwrite your table each time. (There may be a way of doing this within code in some sort of loop to give it a name with a date or rolling number at the end, but that’s not my strong point).

Alternatively, within code or a macro, you could export the data to a text file, but again you would need to change the name as it would be overwritten each time.

LQ
09-18-2001, 09:15 AM
Actually, if you wanted to archive a table by exporting it to a spreadsheet, if you are using Access 97/Excel 97, when you transfer a spreadsheet, the new file does not automatically overwrite the old file. If there is an existing spreadsheet by that name, then Access copies the exported data to the next available new worksheet in the workbook.

Pat Hartman
09-18-2001, 12:07 PM
If you used date parameters could you reproduce the results of the query at a future time? If so, that is your best alternative. Creating temporary tables every time you run a query could seriously clutter your db and become difficult to manage.

mickman17
09-18-2001, 02:32 PM
That is the problem .... since it is a scheduling system, it is 'removed' from the schedule upon completion. The schedule contains items compiled from multiple dates so a parameter query will not reproduce the schedule run on a specific date.