scan append blank in Y ldDate = GetPrSlInfo(PROPID,SOURCE,DATE,"Date") replace Y.TotRooms with 100000, Y.BedRooms with 10000, ; Y.PrSlDate with ldDate endscanLooks like the cause of the problem is REPLACE command in the function called from replace. There's the short version of the code that illustrate the problem.
function GetPrSlInfo lparameter tnPropId, tcSource, tdDate, tcFieldName, tcRetType, tnNumChar, lnRecno, lnReccount local lnSelect, lVar lnSelect=select() lnRecno = recno() && Assuming we're sitting on the correct file lnReccount = reccount() if !used('curPrevSlInfo') select 0 create cursor curPrevSlInfo (RecNum I, date D, Price I, Book I, page I) append blank ENDIF replace RecNum with m.lnRecno in curPrevSlInfo Select(lnSelect) RETURN Date() + lnRecno