Check entry in last 24 hours

Always_Learning

Registered User.
Local time
Today, 23:09
Joined
Oct 7, 2013
Messages
71
Hi There,

Can someone help me please.

I need to run a query in Access 2007 to find any records that have been entered in the last 24 hours.

My field is of type datetime and the name in the database is "EntryDate"

How would I check which records had been input in the last 24 hours?

Thanks for your help.

Best Regards,
 
First, EntryDate must capture the time--does it? Just because its a Date/Time field doesn't mean its set up to capture the time. So make sure.

If so, you would create a calculated field in a query which determines the number of hours from when the query is run until the value in the EntryDate field. You would do this using the DateDiff function (http://www.techonthenet.com/access/functions/date/datediff.php). Then, underneath that field you would enter your criteria (24).

Look at the link I posted and try and write the query, if you get stuck, post back here what you have written and how its not working as well as any error messages you are getting.
 
Hi There,

Got this working now.

Thanks for the help.
 

Users who are viewing this thread

Back
Top Bottom