Saving Query to Table

kstump

New member
Local time
Today, 17:01
Joined
Feb 15, 2005
Messages
8
Is there a way to save a query to a table when I run the query which will allow me to name it then.

Basically, I have tables which are linked to more extended ODBC database which is updated constantly. Each time I run a report (or query) I need to save the data as a table, I would like to be able to name it at that time. I was thinking there would be an module which could be written to do this as an event proceedure "on exit" from the report.

HELP.
 
Very nasty business this. If you have to save it, would you not be better off saving like data in a single table. But that begs the question, if you have access to the original information, why could you not just run your report again rather than saving the query data to a new table each time?
It is possible using VBA and a maketable query. Best way is to create a MakeTable query, check the SQL code and use that in the VBA modify as needed. But I still think you are going down a bad road.
 
Your probably correct in that I could be running into some problems. The problem is that the data in my linked tables (which I do not have control of) change almost daily. When I run the make table query and then print the report one week, all the data will change by the time I run it again. There is no way I can retrieve the information from a report without having it saved.

I guess I could do an append query with an automated date field and run it that way. Do you think that would work better?
 
probably. But if the base data is changing, what good is the old data if it is not valid any longer?
 

Users who are viewing this thread

Back
Top Bottom