>e.Day.Date.AddDays(1).ToString("dd-MMM-yyyy") + "'";
I bet that will cause string values like 31-JAN-2008 and 01-FEB-2008 and these strings are bad for date comparison, aren't they? You could change the whole thing to query the vfp way of date constants, that is: {^yyyy-mm-dd}.
So ...ToString("{^yyyy-MM-dd}") should work for you to prepare the dates as date constant in the query, which vfp handles as date values.
Also see
http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx for how to use ToString and
http://fox.wikis.com/wc.dll?Wiki~VFPSQL-TSQL-Mapping~VFP for mappings of T-SQL (which may be more familiar) to VFP SQL.
example vfp sql:
select * from sometable where somedatefield between {^2008-01-01} and {^2008-12-31}
Bye, Olaf.