Hello, Please help.
I am trying to make a copy of a record into the same table. When this is complete it will be a feature which allows my users to create Template records which can then be used when creating work orders.
I am getting a syntax error on the INSERT INTO. I can't see what I am doing wrong.
Here is the code:
I uploaded an attachment with the info from the MsgBox. Any help would be greatly appreciated.
Btw, the fields included are not everything. I just included those to keep it simple while debugging.
Mike
I am trying to make a copy of a record into the same table. When this is complete it will be a feature which allows my users to create Template records which can then be used when creating work orders.
I am getting a syntax error on the INSERT INTO. I can't see what I am doing wrong.
Here is the code:
Code:
SQL = "INSERT INTO [t_Material Consumed]([Material Name], [Color#], Percent) " & _
"SELECT [Material Name], [Color#], Percent " & _
"FROM [t_Material Consumed] " & _
"WHERE ([Consuming Work Order] = '" & currentID & "');"
MsgBox (SQL)
DoCmd.RunSQL SQL
Btw, the fields included are not everything. I just included those to keep it simple while debugging.
Mike