Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to store all make-table-queries in a table and facilitate deletion 1

Status
Not open for further replies.

MwTV

MIS
Mar 9, 2007
99
Is it possible to have vba to store all make table queries in an Access table along with the number of records created by the query?

Then, I envision an Access form that will display the make-table-queries, the number of records created and then upon depressing a command button, I can delete the contents of the make-table-query tables.

This request is due to severe bloat in the database. Have approximately 25 make-table-queries and consequently, 25 tables that really bogs down the performance of the Access 2000 database.

The make-table-query tables are used to temporarily store the data. Then, a database query within MS Excel, using filters, is used to selectively extract the data to various worksheets within several workbooks.

Thanks in advance.
 

If I understand your question, the answer is yes - you can store the query information in a table. I'd have 2 fields. The first would be a text field to store the query name. The second field would be a memo field to store the SQL code.

Another possibility:
How about creating the queries in a module and access the SQL from there?


Randy
 
Will take a different approach;

Exploring the "consolidation" and/or elimination of make-table queries in favor of using a passthrough query in vba code to either create just one "temporary" table and/or "automatically" generate the Excel-based report.

Just trying to avoid the "bloated" MS Access database.

Any insight?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top