syntax error 3134 - Insert into statement

D

davant

This is the code for inserting records from one table to another, I
keep getting the syntax error,#3134, Insert to statement. I can not
figure it out. I have enclosed fields in brackets since I use spaces
in the field names. WHere is my error? I am only filtering the
conferences since it will be listed twice in my source table. Thanks.

davant


Private Sub cmdAppend_Click()

Dim db As Object
Set db = CurrentDb()

DoCmd.SetWarnings False

CurrentDb.Execute "INSERT INTO Conference (Conference ID,Conference
name,start Date,Start time,End time,Length of conference,Conference
Price)Select (DISTINCT [Conference ID],[Conference name],[start
Date],[Start time],[End time],[Length of conference],[Conference
Price]) FROM ExcelDataTable"

DoCmd.SetWarnings True


End Sub
 
D

davant

I am set; I was missing brackets around the field names;

procedure is working fine.
Debora
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top