Mike-

The format only affects what you see - the internal data storage is the same
regardless of long date or short date.  But a Long Date format does tempt
the user to store time as well as date.  So, if you want all the records for
a given ending date, you must tweak your criteira:

>= [forms]![formname]![calendarstart] And <
([forms]![formname]![calendarstop] + 1)

If you don't do that, you won't get records on the last date that have any
time past midnight.

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Mike Bisson
Sent: Friday, January 20, 2006 12:49 PM
To: [email protected]
Subject: [ms_access] Querying Date in Long Date Format

Hi All,

I have a field in my table that is formatted as a Long Date (1/20/2006
12:00am) for example.  I am using a form for my query paramters.  My
selection criteria is:

Between [forms]![formname]![calendarstart] and
[forms]![formname]![calendarstop]

This isn't working with my Long date field, but if I move the criteria to a
field that is formatted as a short date, it works without a hitch.  Any
idea's????

==================================
Mike Bisson
Manager of IT & Logistics
Carthuplas, Inc.
V: 207-985-4972 x658  F: 207-985-2105
[EMAIL PROTECTED]  http://www.carthuplas.com



 
Yahoo! Groups Links



 






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to