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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time as a Selection Criteria pulling all data 1

Status
Not open for further replies.

Scrye

MIS
Nov 6, 2002
23
US
This seems so trivial but I am having such a time with it. I am working on an Access selection query that someone else wrote and I need to add a time value as part of the selection criteria. I have added a >=[start time] criteria prompt in the query. The problem I am having is that if I have records with an AM time stamp and I only need data for the PM records I get all records.

For example, I have processed orders at 10:00 AM, 1:00 PM and 3:00 PM. I only want to view the orders processed after 1:00 PM. I should see the orders at 1:00 and 3:00 PM. I see all orders when I run the query. It seems like Access has dropped the AM and PM from the selection input.

How do I get Access to allow me to pull data in the form of the "Short Time" or even "Medium Time"?

Thanks in advance for your help!
 
The user is then entereing 1:00 AM as the criteria?

I think you can try two things, first is

>=datevalue ([Enter Time])

Second is instead of entering 1:00 AM, enter 13:00.

ChaZ
 
Correction, >=Timevalue ([Enter Time]), not datevalue.

ChaZ
 
I tried it an it worked both time entries. Thanks!!!!

I didn't realize you could apply a function to a criteria.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top