Hi,
I am trying to move some records from one table to another using sql. When using this code:
I am getting a "too few parameters" error. both tables have the same fields and i want to move all but one field from one table to another. I am not positive if this makes a difference, but the order that i have typed those fields are not the order the columns are in the table. I have used similar code for moving around records with much fewer fields and it has worked, so I do not know where the error is. I have also double checked the spelling of the fields and they should be correct.
Can anybody spot a problem? Thanks in advance.
I am trying to move some records from one table to another using sql. When using this code:
Code:
CurrentDb.Execute "INSERT INTO LER_Digital ([Originated by], [Date Entered], [Reviewed by], [Date Reviewed], [Title], [Event Date], [Report Date], [Report Link], [LER Number], [Facility], [General Plant System], [Plant System], [Operating Mode], [Power Level], [General Description], [Abstract], [Plant Conditions], [Description of Event], [Inoperable SSCs], [Major Occurrence Time], [Secondary Functions], [Method of Discovery], [Operator Actions], [Safety System Responses], [Immediate Cause], [Root Cause], [Analysis of Event], [Contributing Factors], [Assessment of Safety Consequences], [Immediate Corrective Actions], [Corrective Actions to Prevent Recurrence], [Previous LERs], [Additional Information], [SSFF Consideration], [LNHR Consideration], [Commitments], [Lessons Learned], [Cause], [System], [Component], [Reportable to EPIX], [Manufacturer])" & _
"SELECT [Originated by], [Date Entered], [Reviewed by], [Date Reviewed], [Title], [Event Date], [Report Date], [Report Link], [LER Number], [Facility], [General Plant System], [Plant System], [Operating Mode], [Power Level], [General Description], [Abstract], [Plant Conditions], [Description of Event], [Inoperable SSCs], [Major Occurrence Time], [Secondary Functions], [Method of Discovery], [Operator Actions], [Safety System Responses], [Immediate Cause], [Root Cause], [Analysis of Event], [Contributing Factors], [Assessment of Safety Consequences], [Immediate Corrective Actions], [Corrective Actions to Prevent Recurrence], [Previous LERs], [Additional Information], [SSFF Consideration], [LNHR Consideration], [Commitments], [Lessons Learned], [Cause], [System], [Component], [Reportable to EPIX], [Manufacturer] FROM LER_analog WHERE ID =" & getID
I am getting a "too few parameters" error. both tables have the same fields and i want to move all but one field from one table to another. I am not positive if this makes a difference, but the order that i have typed those fields are not the order the columns are in the table. I have used similar code for moving around records with much fewer fields and it has worked, so I do not know where the error is. I have also double checked the spelling of the fields and they should be correct.
Can anybody spot a problem? Thanks in advance.