Beach Access Software
bchacc at san.rr.com
Thu Nov 23 17:11:55 CST 2006
That worked!! Thank you, thank you, thaaank you. Now I can go eat a turkey. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: 23 November 2006 13:54 To: Access Developers discussion and problem solving Subject: Re: [AccessD] Date problem in Bound Form 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.430 / Virus Database: 268.14.14/547 - Release Date: 22/11/2006 17:41