lcTempFile = Sys(2015)+'.tmp' Set Textmerge to (lcTempFile) noshow Set textmerge on use customer Locate for country='Germany' \First record with Country = 'Germany' is rec#<<Recno()>> <<cust_id>> skip && Move record pointer to show it rewinds \Current record number <<Recno()>> \Listing with scan for country = 'Germany' \----------------------------------------- scan for country = 'Germany' \<<recno()>> <<cust_id>> <<country>> EndScan \----------------------------------------- USE orders order tag cust_id \ \=Seek('BERGS', 'orders', 'cust_id') \scan while cust_id = 'BERGS' results \--------------------------------- =Seek('BERGS', 'orders', 'cust_id') scan while cust_id = 'BERGS' \Rec#<<Recno()>>: <<cust_id>> <<order_amt>> endscan \--------------------------------- \ \=Seek('BERGS', 'orders', 'cust_id') \scan while cust_id = 'BERGS' for order_amt > 1000 results \--------------------------------- =Seek('BERGS', 'orders', 'cust_id') scan while cust_id = 'BERGS' for order_amt > 1000 \Rec#<<Recno()>>: <<cust_id>> <<order_amt>> endscan \--------------------------------- \ \scan for order_amt > 1000 results \--------------------------------- scan for order_amt > 1000 \Rec#<<Recno()>>: <<cust_id>> <<order_amt>> EndScan \--------------------------------- Set Textmerge to Set textmerge off Modify Command (lcTempFile) Erase (lcTempFile)Cetin