if rlock('0','mytable') then insert into mytable values (value1, value2) unlock record 0 in mytable else * you can't log in right now, try again endifYou could put this in a loop with a counter or you could bump up reprocess so VFP internally runs its own loop and counter.