Syntex error

aman

Registered User.
Local time
Today, 00:49
Joined
Oct 16, 2008
Messages
1,251
Hi All

I am trying to copy data from a query to a table using vba. Please help me to get rid of the error message.

Code:
Private Sub Command0_Click()
Dim sql As String
sql = "Insert into Table5 values as (select * from query1);"
DoCmd.RunSQL sql
End Sub

Thanks
 
Hi All

I am trying to copy data from a query to a table using vba. Please help me to get rid of the error message.

Code:
Private Sub Command0_Click()
Dim sql As String
sql = "Insert into Table5 values as (select * from query1);"
DoCmd.RunSQL sql
End Sub

Thanks

Code:
sql = "Insert into Table5 select * from query1;"
 

Users who are viewing this thread

Back
Top Bottom