Parameter Query with "<=" losing values?

crazy_loud

Registered User.
Local time
Today, 17:42
Joined
Apr 26, 2007
Messages
19
Any possible solutions to this issue would be much obliged, it's one of two absolutely stupid issues that I'm just working around since I can't resolve...

I have a parameter query set up on a Date/Time field that is returning results not including the last date entered as a parameter. So if the user enters "2007-04-07" for the start date, and "2007-04-30" for the end date, the records with "2007-04-30" are not included.

I know it's some stupid thing I've done with this query that is causing it to do this, but since when does "<= some date" and ">= some date" not include the last date retrieved in the result set... do I need some programming lessons on operators, or what?:confused:
 
Make sure your records don't have a time value.
 
That seems like a response to your other question. This thread deals with parameter query criteria, not importing. Since by your other thread I take it that the field does include time, the problem is that 2007-04-30 8:30 AM is NOT <= 2007-04-30.
 
Thanks pbaldy

Sorry about that, my internet connection died and when I got it back up, I posted that response to the wrong forum and the wrong thread...:o

I got a response back from someone else on another forum saying to gut the time section, but I still don't see why "2007-04-30 12:00 PM" can't be referenced as <= in a parameter? Besides, I need to be that specific in my results retrieval for business purposes. So if I can't do this in Access, it's back to mySQL for me...
 
You don't need to "gut" the time, and you can certainly use it in a criteria. However, if you only require the user to input date, the system will assume a time of midnight, and any time after that will not be included. If you understand how it stores date/time values, you'll understand why.

You either need to have the user input a time too, or force the parameter to be the input date and 11:59:59 PM.
 
So how do you force a section of a parameter to be static?
 
Between [enter start] And [enter end] & " 11:59:59 pm"
 
I had tried that before, and Access beeped at me that the query was "too complex to be evaluated" or some jazz. Must have been a syntax error.

Thanks again for all your help!
 

Users who are viewing this thread

Back
Top Bottom