Hi,
Am working on a database that will hold some data for two departments.
The data from dept1 is entered, when entered I would like it to pass to dept2, so I have four tables say;
dept1header
dept1lines
dept2header
dept2lines
I am able to get the header information from the input form aka dept1 to the dept2 table using the following code;
How would I loop through sub form records doing the same as above.
Many Thanks
Karl
Am working on a database that will hold some data for two departments.
The data from dept1 is entered, when entered I would like it to pass to dept2, so I have four tables say;
dept1header
dept1lines
dept2header
dept2lines
I am able to get the header information from the input form aka dept1 to the dept2 table using the following code;
Code:
Private Sub PasstoSales_Click()
Dim FLineRefs As String
Dim MORefs As String
FLineRefs = Forms![frmMReport]![FCOLineRef]
MORefs = Forms![frmMReport]![MORef]
SQLCom = "INSERT INTO tblSalMHeader (FCOLineRef, MORef) VALUES ('" & FLineRefs & "', '" & MORefs & "')"
DoCmd.RunSQL SQLCom
End Sub
How would I loop through sub form records doing the same as above.
Many Thanks
Karl
Last edited: