John Bartow
john at winhaven.net
Fri Aug 29 17:41:23 CDT 2003
An easy question for you speed optimizing gurus out there:
What should I replace this code (which was meant for a few record updates)
with to make it run faster (it now needs to be used for 500+ records). Watch
for line wrap.
Set rstTemp = db.OpenRecordset("TempMailList")
Do Until rstTemp.EOF
lngRecordID = rstTemp!MailListID
DoCmd.RunSQL "UPDATE MailList SET MailList.StaffID = " & lngNewStaff & ",
MailList.DeptTypeID = " & lngNewDept & " WHERE (((MailList.MailListID)=" &
lngRecordID & "));"
lngCount = lngCount + 1
rstTemp.MoveNext
Loop
TIA
John B.