CopyObject or Make Table query (1 Viewer)

prasadgov

Member
Local time
Today, 17:51
Joined
Oct 12, 2021
Messages
127
Hi,

One of the Access DB I inherited has a code which drops a temp table, runs a make table query, which queries all the fields of a linked table and creates the temp table.
The query uses fields from only the linked table and not other data sources. This is fine and no issues.

Can I rather use the CopyObject to copy the linked table and rename the table to the name of temp table or use the make table query?
DoCmd.CopyObject, "tbltemp_local", acTable, "tbl_Linked"
Which is faster?

TIA
 
To give the best answer, what is different between the "Temp table" and its source? Why do you have a temporary table if it just replicates data already in your database?
 
Probably the most efficient would be emptying and repopulating the local table with an append query. The real question is what purpose does the local table serve?
 
Probably the most efficient would be emptying and repopulating the local table with an append query. The real question is what purpose does the local table serve?
Both the make table and delete/append queries have the same problem. They cause database bloat.

Rather than make the temp table, why not just use the query that selects the data? If there is a valid reason for importing the data, then the experts use a "side" end where we use a template database so it is always clean and import into a fresh copy of the template. That avoids bloat in the main FE.
 

Users who are viewing this thread

Back
Top Bottom