Specify Name in Make Table Query

M

merry_fay

Hi,

I want to create a form with an input cell where a name can be inserted &
then click on a button to run a make table query using the name that was
inserted as the name of the table.
What SQL do I need for this?

Thanks
merry_fay
 
V

vanderghast

You can built the SQL statement in a string and, once done, execute that
string: DoCmd.RunSQL stringSQL

Vanderghast, Access MVP
 
J

John W. Vinson

Hi,

I want to create a form with an input cell where a name can be inserted &
then click on a button to run a make table query using the name that was
inserted as the name of the table.
What SQL do I need for this?

You can't do it in SQL. You need VBA code if you're going to do this

BUT... *why* would you ever want to!?

In a production database, MakeTable queries are *very* rarely needed. If
they're used at all, they'd be to create temporary "scratch" tables in a
separate, throwaway temp database.

Cluttering your database with a separate table with uncontrolled, free-format
names ia a recipe for disaster!

Could you explain what *real life problem* you're trying to solve? There's got
to be a better way!
 

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