I maintain a Plant & Equipment Register in Access 2003. This week I have found out that our Fleet department is printing out copious amounts of paper via a Report and then manually sifting out what they do and don't need.
The report in question has a query as its data source. In turn the query gets its data from two tables that are linked via a common field.
One of the columns on the query is a calculated field that has the following formula:
Due Date: ([Date Last Tested]+([Test Frequency])*7)
The logic behind the formula is that a piece of equipment (e.g. a first aid kit in a vehicle) is checked or tested. The date of this is recorded against the vehicle. The item to be checked also has a test frequency assigned to it as a number of weeks.
So the formula calculates the due date by mulitplying the frequency by seven (7) to get the number of days and then add that the Date Last Tested.
In the underlying tables the Date Last Tested is defined as a Date (Short date) with the Test Frequency as a Number (Integer).
I am trying to get the query to prompt the user to enter a date fon the Due Date field. This is intended so that they can run the report and get a print-out for items whose due date falls before the entered in date.
I have placed the following formula into the Criteria settings for the calculated Due Date field.
<=[Enter Date]
Unfortunately it is producing results that do not comply with the requirements. An example of the query being run against First Aid boxes there are a total of 196 in existence. If I enter 31/12/10 as the date I get 195 results of which some of these have due dates that are clearly after the entered date.
With the information provided can anybody give me some guidance on what we might be doing wrong or what is happening here?