'Microsoft VB 6.3, Access 2002
'Syntax error in the INSERT INTO Statement when the query runs
'How can I make this work?
Private Sub Command52_Click ()
On Error GoTo Err_Command52_C lick
Dim rst As DAO.Recordset
Dim dbs As DAO.Database
Dim rsSQL As DAO.Recordset
Dim strSQL As String
Dim rst As Recordset
Dim strDocName As String, strLinkCriteria As String
Set dbs = CurrentDb
strDocName = "InfoTable"
'MyShow is a textbox on a form that has the name of the target table
'in its text property.
strSQL = "INSERT INTO" & Me!MyShow & _
"SELECT *. FROM [InfoTable];"
DoCmd.RunSQL strSQL
Exit_Command52_ Click:
Exit Sub
Err_Command52_C lick:
MsgBox Err.Description
Resume Exit_Command52_ Click
End Sub
'Syntax error in the INSERT INTO Statement when the query runs
'How can I make this work?
Private Sub Command52_Click ()
On Error GoTo Err_Command52_C lick
Dim rst As DAO.Recordset
Dim dbs As DAO.Database
Dim rsSQL As DAO.Recordset
Dim strSQL As String
Dim rst As Recordset
Dim strDocName As String, strLinkCriteria As String
Set dbs = CurrentDb
strDocName = "InfoTable"
'MyShow is a textbox on a form that has the name of the target table
'in its text property.
strSQL = "INSERT INTO" & Me!MyShow & _
"SELECT *. FROM [InfoTable];"
DoCmd.RunSQL strSQL
Exit_Command52_ Click:
Exit Sub
Err_Command52_C lick:
MsgBox Err.Description
Resume Exit_Command52_ Click
End Sub
Comment