FUNCTION AllocateRollNr() local datenumber datenumber = left(date2(datercvd),2)|mid(date2(datercvd),4,2) while true increment(dpath|"rollnr.dat",1) $rollnr = str(datenumber)|right(date2(datercvd),1)|"/"|right("00"|str(ptval),2) order change key "[RollNr]" data find "[RollNr]" equal $rollnr options "" if cerror ' if none - then return exit while end if end while messboxwait(" Roll Nr assigned is"&str($rollnr)|" ",0,2,1) END FUNCTION 'AllocateRollNr()