** multilocks is ON For nTries = 1 to 100 && try 100 times to update key and save Select v_dbrecord && view on dbrecord lSuccess=CURSORSETPROP("Buffering", 5, "v_dbrecord") pcDatabase=alltrim((lcdbfname))+"%" Requery() ln_value=record_no+1 Replace record_no WITH ln_value Replace UPDATED WITH DATETIME() llSave=tableupdate(.t.,.f.) If llSave Exit Else llRevert=tablerevert() Wait window timeout 0.2 "Trying to get New ID #. Failed on "+alltrim(str(ln_Value)) Endif Endfor ** pass ln_value back to the calling appKevin