function addtableid lparameter ctablename SEEK padr(alltrim(cTableName),10) in tableids iid=tableids.tableid replace tableid with tableid+1 in tableids return iid endfunc