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

Possible Bug in Access?

Status
Not open for further replies.

dabowles

MIS
Jun 26, 2001
64
US
Hi Everyone,
I have a problem with a query that I wrote. For some reason, the query will not limit the information based upon a date range I entered. I have a field entitled "DateOfService", below it in the "Criteria" field in QBE, I have the following typed into the field "Between #10/1/2001# And #10/31/2001#" Now, I know I have this right, no typos no nothing out of the ordinary. I have another query that is almost identical to this one and it works without a problem. However, when I execute this query it doesnt limit the DateOfService field to just dates between 10/1/2001 and 10/31/2001, it pulls every date from every record that is in the database. Does anybody have any information about a possible bug in Access where even after limiting a date field's return, it still returns other date records other than the date specified?

Thanks,
David
 
David,

Are the date fields General date types? If so, try this:
Code:
Between #10/1/2001 00:01# And #10/31/2001 23:59#
 
Nope, no luck there, it does the same thing. It's almost as if the Criteria field is blank, because it completely ignores the date range I have there. I have even attempted to make it a parameterized query and myself enter in the date range, and no luck there. I have even tried different date ranges, say Jan 1, 2001 to Jan 20, 2001, even tried just one day date ranges, and nothing will limit it.

Thanks,
David
 
Do you have any 'OR' criteria...look in the rows below the date criteria row, look all columns.
--Jim
 
David,

Could you post the SQL code here so we can take a look at it??
 
Well that was the problem, What Jim had to say, I had multiple rows of "OR"s and didn't have a date limitation for each row of ORs I had typed in, so I was only getting limitations for my first Critera, but not for the rest. I never have used multiple OR's before, so this was something new to me.

Thanks for your help,
David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top