>* assuming you are in the table that you perform the replace in >lcCurrRec = recno() >skip >lcNextRec = recno() >skip -1 >if lcCurrRec = recno() && hopefully, will always be true > * perform the replace > GOTO lcNextRec >endif >Ok, this is what I ended up with (works fine in my tests):
******************************************************************** * Description.......: LendRev.DetermineNextRecord() * Calling Samples...: * Parameter List....: * Created by........: Nadya Nosonovsky 05/03/2001 04:42:07 PM * Modified by.......: ******************************************************************** local lnRecno, lnSelect, lcFilter, lnNewRecno lnRecno=recno('BldMstr') lnNewRecno=m.lnRecno lnSelect=select() select BldMstr lcFilter=set('filter') if !OpenTble(dbf('BldMstr'),"WorkTable",,"LName") return m.lnRecno endif select WorkTable if !empty(m.lcFilter) set filter to &lcFilter endif goto m.lnRecno if !eof() skip lnNewRecno=recno() endif use in select("WorkTable") select (m.lnSelect) return m.lnNewRecno