Hello,
I have a database that tracks tools. The tools have due dates for when they need to be calibrated. A recent policy shift has made it so all tools are now due by month and not the specific date. (Example: A tool may have previously been listed as being due for calibration on 5-19-15, but now as long as it gets done in May it is alright.)
The due date field is calculated based on a field which records the last calibration date and the specified interval (one month, 6 months, etc.)
Thanks to help from this forum I was able to figure out how to get all the due dates switched to show the last day of the month in which they are due, the problem I am now having is with several of my queries.
For example I have a query which produces a list of all tools due during the current month.
This query worked fine until I switched the due dates to show the last day of the month and now I get a data type mismatch when the query runs. Below is the setup for my query, it worked perfectly prior to my messing with the toolnextcaldate field.
Field: toolDescription toolID toolLocat toolActive toolIssued Year([toolNextCalDate])*12+DatePart("m",[toolNextCalDate]) Table: tblDataPrime tblDataPrime tblDataPrime tblDataPrime tblDataPrime Sort Ascending Show: checked checked checked checked checked not checked Criteria: <>"Scrap" AND <>"O-Cal" <>0 <>0 Year(Date())*12+DatePart("m",Date())
If it helps the field toolNextCalDate is in tblDataPrime and was a calculated field that previously (when everything was working) was set up as: [toollastCalDate]+[toolCalInterval], now it is set up as: DateSerial(Year([toollastcaldate]+[toolcalInterval]),Month([toollastcaldate]+[toolCalInterval])+1,0).