After creating all the DIM statements and setting the statement to the correct field, I type:
DoCmd.RunSQL ("INSERT INTO tableA (Field1,Field2) VALUES (""" & iField1 & """),(""" & iField1 & """)")
DoCmd.RunSQL ("INSERT INTO tableB (Field3,Field4) VALUES (""" & iField3 & """),(""" & iField4 & """)")
DoCmd.RunSQL ("INSERT INTO tableC (Field5,Field6) VALUES (""" & iField5 & """),(""" & iField6 & """)")
But when I click the submit button, I get the following:
Run-time error '3346'
Number of query values and destination fields are not the same.
Am I missing a statement between the DoCmd.RunSQL statements?
DoCmd.RunSQL ("INSERT INTO tableA (Field1,Field2) VALUES (""" & iField1 & """),(""" & iField1 & """)")
DoCmd.RunSQL ("INSERT INTO tableB (Field3,Field4) VALUES (""" & iField3 & """),(""" & iField4 & """)")
DoCmd.RunSQL ("INSERT INTO tableC (Field5,Field6) VALUES (""" & iField5 & """),(""" & iField6 & """)")
But when I click the submit button, I get the following:
Run-time error '3346'
Number of query values and destination fields are not the same.
Am I missing a statement between the DoCmd.RunSQL statements?