can anybody tell me whats wrong with the SQL statement in the following code ?
Function CreateTable()
Dim TableName As String
Dim strSQL As String
TableName = InputBox("Please type a project name")
DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb.Name, acTable, "subcons", TableName, True
MsgBox "Table " & TableName & " created"
'strSQL = INSERT INTO 'TableName' SELECT Subcons.* FROM Subcons WHERE ((([Subcons]![Tag])="S"));
MsgBox "Data transferred to " & TableName
End Function
i'm trying to copy/append certain records from a table called 'subcons' to a table 'tablename'
Function CreateTable()
Dim TableName As String
Dim strSQL As String
TableName = InputBox("Please type a project name")
DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb.Name, acTable, "subcons", TableName, True
MsgBox "Table " & TableName & " created"
'strSQL = INSERT INTO 'TableName' SELECT Subcons.* FROM Subcons WHERE ((([Subcons]![Tag])="S"));
MsgBox "Data transferred to " & TableName
End Function
i'm trying to copy/append certain records from a table called 'subcons' to a table 'tablename'