>....code after tables have been opened
>
>SELECT Table1
>SCAN
>REPLACE Field1 WITH FieldValue IN Table1
> IF SEEK(Field2, "Table2", 2)
> IF Table2.Field1 = .T.
> INSERT INTO Table3 blah blah blah.....
> ENDIF
> ENDIF
>ENDSCAN
>
>There you go, basically what it is doing.
>
>Kev
INSERT is definitely the problem because you insert a record at the current record pointer position with each call. That means you rewrite the entire table from the top down each time and as the number of records in the table increases, the amount of time to rewrite the table increases. Use APPEND instead as this will add each new record to the end of the table and save lots and lots of disk I/O.
-Henry-