the method for asp displayed at the top of this page is a tad old now. your best bet is to use the select @@identity that the jet 4 engine supports (access 2k to you and me :) im not sure how to do it in asp.net though but basicall as long as you use the same connection to the database if you run the query "select @@identity" AFTER youve inserted a record and assign that value to a variable you should get the identity of the record you have just inserted.
i found the solution on
www.drdev.net, but its for classic asp im afraid