Create new table with Macro?

e_lady

Registered User.
Local time
Today, 09:00
Joined
Feb 10, 2004
Messages
14
I've never worked with macros in Access, please excuse the ignorance. I have a report that I can only produce after running queries - one that makes a table and two more that append to it. Is it possible to automate this with a macro? If so, how do I get started?
 
Sure, if I understand what you're asking, this is not difficult. Build your macro with OpenQuery statements, first calling the one that does the MakeTable task, then each of the append queries in proper turn. In effect, the macro just does what you already know how to do manually, but much faster and without your intervention. the KIND of query you're calling in the macro determines what happens, not the macro itself.

Hope that helps.
 
Two other points:

Use the same macro to go ahead and call the report after the queries have finished.

Second, as a matter of housekeeping, you might finish the macro by including a DeleteObject call that wipes out the temporary table used by the report. This step is not absolutely necessary, but it is good form to clean up after yourself!
 

Users who are viewing this thread

Back
Top Bottom