the only time people ask for a method to retrieve the primary key is when said primary key happens to be a surrogate (such as an autonumber)
what they often overlook is that the table should also have a "real" primary key
that's the terminology that i prefer, although data modelling purists will rightly call it an
alternate or
candidate key
have you noticed how often you see threads on discussion forums that begin with "oh please help me, i have duplicates in my table, i want to remove all but the latest of the duplicates"
this is a direct result of not declaring a unique constraint to the "real" (or candidate) key
so...
your table should have a "real" key
hint: it will/should have a unique constraint
when you insert a row, you are supplying the values of the real key
so simply query the row back using those same values, and voila, there's your autonumber
rudy
SQL Consulting