[AccessD] Dates As Criteria

Bobby Heid bheid at sc.rr.com
Tue Feb 13 17:14:26 CST 2007


I usually do something like:

Where FldDate>=ParmDate1 AND FldDate<=ParmDate2

This makes it explicit exactly what you want to do.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Tuesday, February 13, 2007 4:23 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Dates As Criteria

Hello All,

In A2K I ahve a form that has 2 unbound date fields...have input masks and 
formats as SHORT DATE...I have a query that uses these fields as criteria in

a BETWEEN statement.  The field in the table is a general date.  I'm using 2

records to check...if I set the startdate and enddate on the form to the 
dates that are in the db...they return..but if I use ofther dates...nothing 
comes back.  Example:

StartDate:2/6/2007
EndDate: 2/13/2007

2 records:
DT=2/9/2007
DT=2/13/2007

Using the above "between startdate and enddate" I return 1 record?
If I change the startdate to 2/9/2007 then I return both
IF I use 2/6 and2/17 as the start and end...I return NOTHING...

Anyone...please help...I'm sure I've done something silly...but this just 
doesn't make sense???

Thanks,

Mark A. Matte





More information about the AccessD mailing list