PC Review


Reply
Thread Tools Rate Thread

Date Parameter for Now() field

 
 
=?Utf-8?B?S2V2aW43Ng==?=
Guest
Posts: n/a
 
      10th Oct 2006
I have a table where the date field is Now() providing the date and time of
each record. I tried to query it using a date as the parameter [Enter Date]
but it does not find any records. When I do for example Like "10/10/2006*" I
get the results I want. Now how do I turn that into a parameter so it will
ask me to enter the date each time and be programmed to do the like thingy.
 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      10th Oct 2006
a datetime value with non-zero time component is NOT equal to date-only
value!

You need to use Between to select a range or more accurately greater than /
equal operator and less than operator like:

([DateField] >= [Enter Date]) AND
([DateField] < DateAdd("d", 1, [Enter Date]))

(typed as 1 line in the criteria row of your Query grid).

--
HTH
Van T. Dinh
MVP (Access)



"Kevin76" <(E-Mail Removed)> wrote in message
news:208EE1F6-2DEB-45A1-B392-(E-Mail Removed)...
>I have a table where the date field is Now() providing the date and time of
> each record. I tried to query it using a date as the parameter [Enter
> Date]
> but it does not find any records. When I do for example Like
> "10/10/2006*" I
> get the results I want. Now how do I turn that into a parameter so it
> will
> ask me to enter the date each time and be programmed to do the like
> thingy.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter based on Date Field =?Utf-8?B?ZGgxMDY5?= Microsoft Access Forms 2 9th May 2007 01:30 AM
Parameter Query Using a Date Field =?Utf-8?B?REFuZ2VsaWE=?= Microsoft Access Queries 2 26th Jan 2006 12:15 AM
Parameter query with date field Bethany via AccessMonster.com Microsoft Access Queries 8 10th Jun 2005 07:29 PM
dlookup with date field as parameter in ADP =?Utf-8?B?RlJFRA==?= Microsoft Access ADP SQL Server 1 14th Apr 2005 11:42 PM
Simply querying date/time field for particular date with parameter query Brian Microsoft Access Queries 2 22nd Jan 2004 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 PM.