Hey guys,
First of all thanks for any help you can offer. I've searched this topic a little and found similar posts, but whatever I do always seems to yield an error.
I have two INSERT INTO statements that I would like to combine so that they insert into the same line on the same table. However, one uses a slightly different syntax than the other one and it is giving me trouble.
Code:
DoCmd.RunSQL " INSERT INTO tblSubAssemblyInfo( PartID ) SELECT tblPartMain.ID FROM tblPartMain WHERE (((tblPartMain.[Select]) = True))"
DoCmd.RunSQL " INSERT INTO tblSubAssemblyInfo(ParentAssemblyID, Qty, IsAnAssembly, MyNotes) VALUES( '" & [Forms]![frmAssemblyParts]![Magic3] & "','1', 'False', 'Notes') "
.
Both lines run independantly, but insert onto two seperate lines in tblSubAssemblyInfo. Clearly I need to only run DoCmd.RunSQL once, but I am not sure how to phrase the proper code.
Thanks for any help that you can provide - I really appreciate it.