Make table

M

mark

Hi,
I am trying to make a table from code.
The same SQL is working in a query,
But when running the following in code - nothing happen
(not even an error message)

srtSQL = "SELECT Action.action INTO test FROM [Action]"
CurrentDb.Execute srtSQL

Is it not possible to create a teble from code?
Many thanks,
Mark
 
J

Jeff Boyce

Mark

SELECT ... INTO ... is equivalent to Access' Append query.

CREATE ... is equivalent to the Make Table query.
 
M

Marshall Barton

Jeff said:
SELECT ... INTO ... is equivalent to Access' Append query.

CREATE ... is equivalent to the Make Table query.


Get some sleep Jeff or another cup of coffee ;-)

INSERT INTO ... is an Append query

SELECT ... INTO ... is a Make Table query
 
M

Marshall Barton

mark said:
I am trying to make a table from code.
The same SQL is working in a query,
But when running the following in code - nothing happen
(not even an error message)

srtSQL = "SELECT Action.action INTO test FROM [Action]"
CurrentDb.Execute srtSQL

Is it not possible to create a teble from code?


Sure it's possible and what you have looks OK to me.

What makes you think it didn't do anything? If it's just
that you don't see the test table in the db window, try
using the RefreshDatabaseWindow method.
 
J

Jeff Boyce

Mark

Please see Marsh's comments and disregard mine!

Jeff Boyce
(sleepy) <Access 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