A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

setting "date" criteria



 
 
Thread Tools Display Modes
  #1  
Old August 31st, 2004, 07:22 PM
Jeff G
external usenet poster
 
Posts: n/a
Default setting "date" criteria

When I set a criteria in a query "between [a] and [b]" to
prompt for dates "a" and "b" and then type in "8/16/04"
for "a" and "8/31/04" for "b" when prompted, I get
extraneous dates returned from dates prior to this range
from 2002 and 2003. I If I set the criteria as: "between
#8/16/04# and #8/30/04#" the dates are correctly displayed
(no extraneous data is displayed from 2002 and 2003). Any
ideas on how to get the correct dates displayed when
prompted by the query? The date field in the query is
the "general" date format.

thanks much
Jeff G

  #2  
Old August 31st, 2004, 08:45 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default

"Jeff G" wrote in message
...
When I set a criteria in a query "between [a] and [b]" to
prompt for dates "a" and "b" and then type in "8/16/04"
for "a" and "8/31/04" for "b" when prompted, I get
extraneous dates returned from dates prior to this range
from 2002 and 2003. I If I set the criteria as: "between
#8/16/04# and #8/30/04#" the dates are correctly displayed
(no extraneous data is displayed from 2002 and 2003). Any
ideas on how to get the correct dates displayed when
prompted by the query? The date field in the query is
the "general" date format.


Open the parameters dialog in the query's design view and explicitly set
the [a] and [b] parameters to Date DataTypes. Then try it again. Access
might be making an improper assumption about the DataType and doing a Text
comparison.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


  #3  
Old August 31st, 2004, 09:30 PM
Jeff G
external usenet poster
 
Posts: n/a
Default

Bingo! thanks for your help
-----Original Message-----
"Jeff G" wrote in

message
...
When I set a criteria in a query "between [a] and [b]"

to
prompt for dates "a" and "b" and then type in "8/16/04"
for "a" and "8/31/04" for "b" when prompted, I get
extraneous dates returned from dates prior to this range
from 2002 and 2003. I If I set the criteria

as: "between
#8/16/04# and #8/30/04#" the dates are correctly

displayed
(no extraneous data is displayed from 2002 and 2003).

Any
ideas on how to get the correct dates displayed when
prompted by the query? The date field in the query is
the "general" date format.


Open the parameters dialog in the query's design view and

explicitly set
the [a] and [b] parameters to Date DataTypes. Then try

it again. Access
might be making an improper assumption about the DataType

and doing a Text
comparison.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using date range in query criteria Kathi Running & Setting Up Queries 4 August 30th, 2004 03:10 PM
date criteria for report from form Peter Woodhead Setting Up & Running Reports 5 July 17th, 2004 12:19 PM
Date Criteria on Query xx General Discussion 1 July 16th, 2004 01:26 PM
Calendar Object Steve Setting Up & Running Reports 1 May 18th, 2004 04:44 PM


All times are GMT +1. The time now is 11:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.