I guess I don't see the point in converting a date to a string, and then using brackets to turn it right back into a date for the query...when it can simply be left as a date for the query.
BTW, Mark, I heard your presentation last night was really good, wish I could have seen it.
>
>>The issue here is the "SET STRICTDATE TO" setting. Your app must be setting it to 0 somewhere, but your development environment isn't. I generally turn the setting to 0.
>>
>>To make it work with the default setting of 1, you would need to format your date in the appropriate format (see the help file for more info on strictdate):
>>
>>
>>LOCAL lcWhere, lcStartDate, lcEndDate
>>lcWhere = ''
>>WITH THISFORM.txtStartDate
>> IF NOT EMPTY(.Value)
>> lcStartDate = "^" + TRANSFORM(YEAR(.VALUE)) + ;
>> "-" + TRANSFORM(MONTH(.VALUE)) + ;
>> "-" + TRANSFORM(DAY(.VALUE))
>> lcWhere = "AND invdate>={"+lcStartDate+"}"
>>ENDIF
>>ENDWITH
>>
>>WITH THISFORM.txtEndDate
>> IF NOT EMPTY(.Value)
>> lcEndDate = "^" + TRANSFORM(YEAR(.VALUE)) + ;
>> "-" + TRANSFORM(MONTH(.VALUE)) + ;
>> "-" + TRANSFORM(DAY(.VALUE))
>> lcWhere = lcWhere + "AND invdate<={"+lcEndDate+"}"
>>ENDIF
>>ENDWITH
>>
>>
Steve Gibson