Stuart McLachlan
stuart at lexacorp.com.pg
Mon Aug 1 19:48:19 CDT 2011
I messed that one up. It should have been: Function test() Dim t1 As Single Dim t2 As Single Dim x As Long Dim tests As Long tests = 1000000 Dim rs1 As DAO.Recordset Dim rs2 As DAO.Recordset Set rs1 = CurrentDb.OpenRecordset("Table1") Set rs2 = CurrentDb.OpenRecordset("Table2") rs1.AddNew t1 = Timer For x = 1 To tests rs1(1) = rs2(1) Next t2 = Timer Debug.Print tests & " iterations on FieldNum: Finished in " & t2 - t1 & " seconds" t1 = Timer For x = 1 To tests rs1("field1") = rs2("field1") Next t2 = Timer Debug.Print tests & " iterations on Literal: Finished in " & t2 - t1 & " seconds" t1 = Timer For x = 1 To tests rs1!field1 = rs2!field1 Next t2 = Timer Debug.Print tests & " iterations on Bang: Finished in " & t2 - t1 & " seconds" 1000000 iterations on FieldNum: Finished in 1.652344 seconds 1000000 iterations on Literal: Finished in 2.816406 seconds 1000000 iterations on Bang: Finished in 2.730469 seconds Which suggests that Jim was mistaken when he said: "All the bang/dot notation internally is converted to that format before being executed." -- Stuart On 2 Aug 2011 at 10:33, Stuart McLachlan wrote: > You don't even need large table to test the relevant part. Just two > tables with at least one record in one of the tables: