I never tried doing a batch insert, but you can always just do an excute statement inside the for loop instead. But you would have to make sure your first assigment statement to strSQL doesn't include itself.
VB Code:
For intCounter = 1 To ClassInfos.Count strSQL = " Insert into Class(ClassID,ProgramID,StudentID) Values(" strSQL = strSQL & "'" & ClassInfos.Item(intCounter).ClassID & "','" & PInfo.ProgramID & "','" & SInfo.StudentID & "')" & vbCrLf adoCmd.Execute strSQL Debug.Print strSQL Next intCounter




Reply With Quote