OH thanks but i meant table name not Table and...i was going to use a cursor so ill change to _tally.(reccount) cant count cursors?
>Ken,
>
>Your example syntax is confusing where you are using the word TABLE in the FROM clause. Is this the way you actually have your code written? Because that word needs to be the name of a table not the word TABLE as in;
>
>
>SELECT * FROM Client WHERE client.DateApp=sdate INTO TABLE apprreport
>
>
>Which will get you all the records that match the value of sdate in the field DateApp. BTW, I would suggest that use select into a cursor instead of a table as the cursor will be cleaned up by VFP automatically when you close it where as the TABLE will hang around taking up disk space until you manually delete it.
>
>To get your data range you would use;
>
>
>SELECT * FROM Client WHERE client.DateApp >= sdate AND client.DateApp <= edate INTO CURSOR apprreport
>
>
>You do not need to USE the table for your select explicitly, the SELECT command will open the table for you.
>
>Your result checking should use the _TALLY system variable when you use cursors as your target as it is more accurate for determining the number of records returned than using RECCOUNT().
>
>
>SELECT * FROM Client WHERE client.DateApp >= sdate AND client.DateApp <= edate INTO CURSOR apprreport
>IF _TALLY=0
> MessageBox("no records to display")
>ELSE
> MessageBox("ken>all")
>ENDIF
>