Thanks in advance for any help. I am trying to export my subform's 'datasheet view' data to 'temp table' (it's a real table and I have code to clear it out to receive new data). I'm trying to loop through the below. This code works fine for exporting the first row of the datasheet, but I need it to do all the rows (between 50 and 100 rows usually display). Can someone coach me along with looping this?:
Dim strInsertBillingIntoTemp As String
strInsertBillingIntoTemp = "INSERT INTO Billing_Temp " & _
"(peopleId, audited,billYear,charge,pastDue," & _
"totalDue, peopleName, fee ) " & _
"VALUES( '" & _
Forms![reviewBilling]![reviewBillingSub].Form![People ID].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![cbxAudited].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Bill Year].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Charge].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Past Due].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Total Due].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Name].value & "','" & _
Forms![reviewBilling]![reviewBillingSub].Form![Fee Type].value & "');"
DoCmd.RunSQL strInsertBillingIntoTemp