INSERT INTO table1 .... ? table1.keyIDIf your program doesn't know the name of the primary key field, see KEY(), TAGCOUNT(), PRIMARY() functions...your code can figure out the name of the primary key field. Then use eval() to get the new key:
lcKeyField = "table1." + key(1) && you'd have to SELECT the table, and then set the work area back ? eval(lcKeyField)