select stock_id from vinvdetail into curs temp where stock_id=this.value if _tally<>0 wait windows 'This item already exist...' timeout 1 endifthe problem is when the operator moves the cursors between items, the message always shows up, because it detect it own record.