Select Query on Current Date

O

ORAD

I can't get a query to pull up records using the current date as criteria. I
have tried the Date() and Now() functions, and checked all the formatting on
the fields. It always comes up empty.
 
J

Jeff Boyce

We aren't there. We can't see your data. We can't see your SQL statement
(query).

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

I can't get a query to pull up records using the current date as criteria. I
have tried the Date() and Now() functions, and checked all the formatting on
the fields. It always comes up empty.

Correct the error in your query. As Jeff says, we can't see it from here!

But as a guess, since it's a very frequent problem, you have the date and time
stored in your table field and want to return all times for the desired date.
If so, try a criterion of
= Date() AND < Date()+1

This will get all records from #11/17/2008 00:00:00 AM# through
#11/17/2008 11:59:59 PM# on today's date.
 
J

John Spencer

AS a guess, your field contains a date and a time. If so, then the likelihood
of the field containing exactly the current date and time (now()) or the exact
date at midnight are remote.

TRY the following as criteria and see if you get records for the current date.
BETWEEN Date() and Date()+1

If that doesn't work post the field you are attempting to query and the type
of field (DateTime, Text, Memo, etc).

Also helpful would be posting the exact SQL query that you are trying to use
(Select View: SQL from the menu when you are looking at the query design)

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top