Stuart McLachlan
stuart at lexacorp.com.pg
Thu Nov 23 15:53:54 CST 2006
Ah, the joys of internationalisation :-)
See below
On 23 Nov 2006 at 13:36, Beach Access Software wrote:
> The filter which is set to limit records with a scheduled start date in
> November looks like this:
...
> fldPMScheduleStartDate >= #01/11/2006# AND fldPMScheduleStartDate <=
> #30/11/2006#
>
> The two date are copied out of the unbound text boxes on the form just as
> they appear. The text boxes have their format set to Short Date.
>
> Anyone know why the filter is failing to filter?
Because SQL and "#"'s require US format.
Assuming you are getting the two dates from txtStart and txtEnd, use
something like the following, then it doesn't matter what the machine's
local date settings are:
strFilter = "fldPMScheduleStartDate >= Datevalue('" & txtstart & "') AND
fldPMScheduleStartDate <= Datevalue('" & txtend & "')"
--
Stuart