Specify Name in Make Table Query

  • Thread starter Thread starter merry_fay
  • Start date Start date
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
 
You can built the SQL statement in a string and, once done, execute that
string: DoCmd.RunSQL stringSQL

Vanderghast, Access MVP
 
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!
 
Back
Top