Prompt for "INTO" table in make-table query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a make-table query, but now I want to modify it so that it prompts
me for a new table name to create each time I run it. How do I do this?

Thanks,
L. Jones
 
Using some code , you can do that

Function CreateTable()
Dim NewTableName As String
NewTableName = InputBox("Please select new table name")
If Len(Trim(NewTableName)) <> 0 Then
DoCmd.RunSQL "SELECT TableName.* INTO " & NewTableName & " FROM TableName"
End If
End Function
 
I created a make-table query, but now I want to modify it so that it prompts
me for a new table name to create each time I run it. How do I do this?

Thanks,
L. Jones

MakeTable queries are VERY rarely necessary. What are you doing with
this new table which cannot be done using a Select query selecting the
same data?

It sounds like you're "storing data in tablenames", always a Bad Idea.

This kind of operation was necessary in some other database software
(dBase comes to mind) but is very rarely truly needed in Access.

John W. Vinson[MVP]
 
Back
Top