...perhaps it helps you. "Id" is a text field I use in every table. This function is called after every "append blank" statement.
*--- Automated id-counter 06.09.00 GN
*--- 20.11.2001 len for Id variabel
FUNCTION Auto_id
LOCAL nTemp, cTemp, nLenId
SET DELETED OFF...