My script inserts data to two tables. Table1 has an autonumber field, which is the primary key. The algo is the ff:

1. Insert record to table1. (thus creating a new value in the autonumber field).
2. Get the new value from the autonumber field of table1 and inserts it to table2.

My problem now is, how can i get the new value in the autonumber field from table1?