lcOldFilter = set('filter') lnOldRecno = Recno() lcBillno = Thisform.sometextobject.value ldDateIn = Thisform.somedateobject.value lcDateIn = '{^' + tran(year(m.ldDatein)) + '-' + tran(month(m.ldDatein)) + '-' + tran(day(m.ldDatein)) + '}' lcFilter = 'BillNo = [' + m.lcBillno + '] and Datein = ' + m.lcDatein set filter to &lcFilter locate if eof() =messagebox('Oops, no matching records', 16, 'Uh-oh, problem encountered') set filter to &lcOldFilter if between(lnOldRecno,1,Reccount()) go lnOldRecno endif endifSince there are no variables nor objects of any type in the FILTER statement, nothing to be tripped up by.
>lcFilter = "BILLNO=" + Transform( m.lcBillNo) + " AND DATEIN=CTOD('" + DTOC( m.lcDateIn) + "')" >>best regards