From: Steve Sanford limbim53 at yahoo dot on 1 Oct 2009 11:01 Good catch! I've looked at that line so much that I know I saw that closing parenthesis... I swear I did! :D -- Steve S -------------------------------- "Veni, Vidi, Velcro" (I came; I saw; I stuck around.) "Hans Up" wrote: > babs wrote: > > > sSQL = sSQL & """, " & r.Fields(6) & ", " & r.Fields(7) & ";" > > > > Debug.Print sSQL > > > > INSERT INTO [JeffTime Card MD Query] ([Man Name], [Job #], [name], [Date], > > Workdate, [Day], [Hours(ST)], ActualRate) VALUES ("BROOKS, CLAIRE", 1800270, > > "U.S. Post Office, Rockford", #10/4/2009#, #9/28/2009#, "Mon", 0, 42.05; > > You need a closing parenthesis for the list of VALUES. Change the last > line of your code which creates the insert string to: > > sSQL = sSQL & """, " & r.Fields(6) & ", " & r.Fields(7) & ");" > > I think the INSERT statement should look like this: > > INSERT INTO [JeffTime Card MD Query] ([Man Name], [Job #], [name], [Date], > Workdate, [Day], [Hours(ST)], ActualRate) VALUES ("BROOKS, CLAIRE", > 1800270, > "U.S. Post Office, Rockford", #10/4/2009#, #9/28/2009#, "Mon", 0, 42.05); > > Try pasting it into the SQL View of a new query and let us know whether > or not the INSERT is successful. >
First
|
Prev
|
Pages: 1 2 3 4 5 6 7 Prev: Paste Append into Access 2007 from Excel 2007 Next: Access 2007 - Run Time error '2114': |