Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with timestamp query

Status
Not open for further replies.

Brlee1crv

Technical User
Apr 10, 2003
96
0
0
US
Greetings,
I have a field on a form (ReviewStamp) that is timestamped Date() if Completed is selected in a combo box. However when I try to query for records using this field in the table, I get no results. I've tried creating a query using Date() for the criteria under the ReviewStamp field and tried using a date range query but to no avail. Does the time have anything to do with the query not working? Help. Thanks.
 
It can. If you are putting a full date and time in a record, then using Date() won't be specific enough.

If thats the case, then instead of using date() for criteria, try using >=date() and <=date()+1. This makes it possible to get data for the next day, but only if it is the next day at exactly midnight, so probably OK.

ChaZ
 
That's what I'm afraid of...is there a way of timestamping a field with just the date only?
 
Well, using just date() gives you just the date, no time. Is that what you are using? Or are you using now()?

ChaZ
 
What are the real values of ReviewStamp in the table ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks Blorf...whoops I realized I typed the wrong thing. I am using Now() and not Date(). I tried using date() but everytime I used it on the form Access would enter the date that the record was created and not when Completed is selected in the combobox.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top