The record pointer should be at the record just inserted, so you should be able to do
liNewId = Alias.KeyField
>Hi
>
>I have a table with an autoincrement field. I add a record.
>
>How can I tell what value has been assigned? I am flirting with rlock("0", "alias") to lock the table header (to at least prevent any other inserts until I have determined the new ID) but it's not going that well.
>
>Is there a canned answer anywhere?
>
>Cheers
>
>Stuart Dunkeld
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer