> I have been trying a write a simple between dates expression for a query.
> Nothing is working. Can anyone help? Between dates 01/01/2006 and 06/30/2006.
>
> Many thanks

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
>> I have been trying a write a simple between dates expression for a query.
>> Nothing is working. Can anyone help? Between dates 01/01/2006 and 06/30/2006.
[quoted text clipped - 5 lines]
>
>Where YourTable.[DateField] Between #1/1/2006# and #6/30/2006#
I just tried that and now a prompt comes up when I run the query.
>If you wish the user to be able to enter the date range as needed,
>then:
[quoted text clipped - 3 lines]
>Change YourTable and DateField to whatever the actual table and date
>field names are.
Uschi - 12 Aug 2006 21:12 GMT
>>> I have been trying a write a simple between dates expression for a query.
>>> Nothing is working. Can anyone help? Between dates 01/01/2006 and 06/30/2006.
[quoted text clipped - 9 lines]
>>Change YourTable and DateField to whatever the actual table and date
>>field names are.
Uschi - 12 Aug 2006 21:19 GMT
>>> I have been trying a write a simple between dates expression for a query.
>>> Nothing is working. Can anyone help? Between dates 01/01/2006 and 06/30/2006.
[quoted text clipped - 9 lines]
>>Change YourTable and DateField to whatever the actual table and date
>>field names are.
When I run the query with the criteria Between "01/01/2006" AND "06/30/2006"
I will get the months and days specified but it will not give me all the
years and not just 2006.
Thank you,
Rick Brandt - 13 Aug 2006 13:33 GMT
> When I run the query with the criteria Between "01/01/2006" AND
> "06/30/2006" I will get the months and days specified but it will not
> give me all the years and not just 2006.
> Thank you,
If you use quotes (") then you get a string comparison rather than a Date
comparision. Use # instead.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Uschi - 14 Aug 2006 05:43 GMT
>> When I run the query with the criteria Between "01/01/2006" AND
>> "06/30/2006" I will get the months and days specified but it will not
[quoted text clipped - 3 lines]
>If you use quotes (") then you get a string comparison rather than a Date
>comparision. Use # instead.
Rick, thank you for your reply. I am revising a database created years ago by
someone else and after going around in circles all weekend on this I
discovered the problem is the Date Field in the tables. Some of Date Fields
are Text and others are Date/Time. Some have an InPut Mask, others don't.
For the tables that have date fields using (Date/Time)the query works using #,
however many of the dates look like 1_/1_/2006. The Find and Replace will not
work. Do you suggestions on how to clean this up? Any suggestions will be
greatly appreciated.