Matt_Lavoie
Registered User.
- Local time
- Today, 16:00
- Joined
- Aug 24, 2011
- Messages
- 13
I'm working on an Access 2007 database that has a report in it that asks you for a start and end date which it plugs into a query to get all the records in that date range, and then it shows you the results in a report.
Problem is that the query is returning extremely inconsistent results.
For example, I was prompted for a start and end date, and entered 9/10/11 through 10/10/11. (MM/DD/YY format).
So the code that is saved in the query is:
HOWEVER, the Datasheet view for the query shows records with dates: 9/1, 9/10, and 10/2 through 10/11
Records exist for every day in the range spcified, and not only are they not showing up, but it is showing records outside the date range.

I have no idea where it's getting these dates from. I can post the results for any other date range you ask for if you want. Any ideas? Thanks!
Problem is that the query is returning extremely inconsistent results.
For example, I was prompted for a start and end date, and entered 9/10/11 through 10/10/11. (MM/DD/YY format).
So the code that is saved in the query is:
Code:
SELECT [tblEquipmentFluids].Date, [tblEquipmentFluids].Equipment, [tblEquipmentFluids].Diesel, [tblEquipmentFluids].HydFluid, [tblEquipmentFluids].TransFluid, [tblEquipmentFluids].EngFluid, [tblEquipmentFluids].AntiFreeze
FROM tblEquipmentFluids
WHERE ((([tblEquipmentFluids].Date) Between #9/10/2011# And #10/10/2011#));
HOWEVER, the Datasheet view for the query shows records with dates: 9/1, 9/10, and 10/2 through 10/11
Records exist for every day in the range spcified, and not only are they not showing up, but it is showing records outside the date range.

I have no idea where it's getting these dates from. I can post the results for any other date range you ask for if you want. Any ideas? Thanks!