Make-Table Query

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Is there a way that I can create a make-tble query that
will prompt the user to enter a name for the table being
created? Is there a way to do this (prompt the user for
a table name) when importing from Excel?
 
Is there a way that I can create a make-tble query that
will prompt the user to enter a name for the table being
created? Is there a way to do this (prompt the user for
a table name) when importing from Excel?
--------------------
You can't use a parameter for the table name.

You would need to write some VBA code from a form. The user will enter the
desired table name into a text box. A command button would then execute
some code which will substitute the table name, something like:

Private Sub Command2_Click()

Dim txtCommand As String
txtCommand = "Select * Into " & Me!Text0 & " From Products;"
DoCmd.RunSQL txtCommand

End Sub
 
Back
Top