![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following lines in a macro: sql = "INSERT INTO IM (ITEM, DESC) VALUES (vitem, ndesc)" DoCmd.RunSQL sql Every time I execute the macro, I get a run time error saying there is a syntax error in the INSERT INTO command. I have tried numerous variations with the same result. I would greatly appreciate anybody's help in pointing me in the right direction. John Cantlin |
#3
| |||
| |||
|
|
What are vitem and ndesc? Are they variables in your code? If yes, concatenate their values into the string: sql = "INSERT INTO IM (ITEM, DESC) VALUES (" & vitem & ", " & ndesc & ")" |
![]() |
| Thread Tools | |
| Display Modes | |
| |