make table query

S

Souris

I wnated to use make table query to create temp local table at run time.

It seems that the query uses "INSERT tblMyTable ... INTO ..." which is
create a table from another table structure.

Does MS Acess support "CREATE TABLE" query to create a brand new table temp
local table and drop at the end like a temporary table?

I just wanted to be a cllean database tables from user of the view to create
te,p table for report for end user.

Your information is great appreciated,
 
J

Jerry Whittle

You can create an empty table with the same structure, except for indexes and
constraints, with your make table query. Just add the following to the SQL:

WHERE 0 = 1 ;
 
J

John W. Vinson

Does MS Acess support "CREATE TABLE" query to create a brand new table temp
local table and drop at the end like a temporary table?

Yes, depending on the version. Such DDL queries are supported in 2003 and
2007; I don't think they were available earlier.

It's often useful to create such scratch tables in a new, empty .mdb file
created for the purpose using the CreateDatabase method in VBA code. This
avoids any problems with bloat in your frontend database.

John W. Vinson [MVP]
 
S

Souris

Thanks millions for the message,

John W. Vinson said:
Yes, depending on the version. Such DDL queries are supported in 2003 and
2007; I don't think they were available earlier.

It's often useful to create such scratch tables in a new, empty .mdb file
created for the purpose using the CreateDatabase method in VBA code. This
avoids any problems with bloat in your frontend database.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top