>I need to gather records from a date field from a range to a range. What I'm trying is not working "where registration.flddate between thisform.text1.value and thisform.text2.value" What wrong with this line of code. I'm getting from vfp "Filter Clear" and "Object is not contained in a form" and all my records are displaying
>
Hi Randy,
Looks like your select is fully optimazable. In this case foxpro doesn't create cursor but instead opens source table with command similar to USE AGAIN and uses
SET FILTER TO BETWEEN(registration.flddate, thisform.text1.value, thisform.text2.value)
to filter records. SET FILTER expression is evaluated every time the pointer in a table moves not at the time when it's issued. To avoid this problem add NOFILTER clause to the Select to force foxpro to create a cursor as a temporay file.
--sb--