I’m a decided “newbie” when it comes to MS Access and databases in general. That I’ll state upfront. We’ve always used an Excel spreadsheet for tracking tool calibration in the past and it’s been adequate, but more recently the need for a better solution has become apparent.<\/p>\n
Advertisement
I’ve created a simple database in Access with two tables. The first table “Instruments” contains information including:<\/p>\n
\n
\n
Tool ID<\/p>\n<\/li>\n
\n
Serial number<\/p>\n<\/li>\n
\n
Location<\/p>\n<\/li>\n<\/ul>\n
The second table “Calibration Log” contains the actual calibration records:<\/p>\n
\n
Certificate number<\/li>\n
Last calibration date<\/li>\n
Next calibration (a calculated value from the last calibration date + 365.25)<\/li>\n<\/ul>\n
Creating a relationship between the two tables was fairly straightforward and a simple query works as expected. Great so far. But there’s a problem, and here’s where I hope someone can point me in the right direction.<\/p>\n
How might I structure a query which only returns the most recent calibration record for each tool?<\/p>\n
For instance, if a tool has only one record in the calibration records table there’s no issue. A query returns the “next calibration date” from one table along with corresponding tool details from the other table as expected.<\/p>\n
But upon re-calibration that tool will have another record against it (and subsequent ones each year). Running the query would return duplicate lines for the tool with multiple “next calibration” dates. I somehow need to filter out all but the most recent record for each tool.<\/p>\n
I considered filtering to show only dates between x-y but if a tool is somehow missed in a calibration cycle it would be repeatedly missed going forward rather than showing up as being very far past-due.<\/p>\n
I suspect that this may be something that needs Access and Excel working together but I’m not at all certain. Thanks in advance.<\/p>","upvoteCount":2,"answerCount":16,"datePublished":"2024-01-18T19:46:46.000Z","author":{"@type":"Person","name":"jarmbrister","url":"https://community.spiceworks.com/u/jarmbrister"},"suggestedAnswer":[{"@type":"Answer","text":"
Greetings, all.<\/p>\n
I’m a decided “newbie” when it comes to MS Access and databases in general. That I’ll state upfront. We’ve always used an Excel spreadsheet for tracking tool calibration in the past and it’s been adequate, but more recently the need for a better solution has become apparent.<\/p>\n
I’ve created a simple database in Access with two tables. The first table “Instruments” contains information including:<\/p>\n
\n
\n
Tool ID<\/p>\n<\/li>\n
\n
Serial number<\/p>\n<\/li>\n
\n
Location<\/p>\n<\/li>\n<\/ul>\n
The second table “Calibration Log” contains the actual calibration records:<\/p>\n
\n
Certificate number<\/li>\n
Last calibration date<\/li>\n
Next calibration (a calculated value from the last calibration date + 365.25)<\/li>\n<\/ul>\n
Creating a relationship between the two tables was fairly straightforward and a simple query works as expected. Great so far. But there’s a problem, and here’s where I hope someone can point me in the right direction.<\/p>\n
How might I structure a query which only returns the most recent calibration record for each tool?<\/p>\n
For instance, if a tool has only one record in the calibration records table there’s no issue. A query returns the “next calibration date” from one table along with corresponding tool details from the other table as expected.<\/p>\n
But upon re-calibration that tool will have another record against it (and subsequent ones each year). Running the query would return duplicate lines for the tool with multiple “next calibration” dates. I somehow need to filter out all but the most recent record for each tool.<\/p>\n
I considered filtering to show only dates between x-y but if a tool is somehow missed in a calibration cycle it would be repeatedly missed going forward rather than showing up as being very far past-due.<\/p>\n
I suspect that this may be something that needs Access and Excel working together but I’m not at all certain. Thanks in advance.<\/p>","upvoteCount":2,"datePublished":"2024-01-18T19:46:46.000Z","url":"https://community.spiceworks.com/t/using-ms-access-for-tool-calibration-log/965531/1","author":{"@type":"Person","name":"jarmbrister","url":"https://community.spiceworks.com/u/jarmbrister"}},{"@type":"Answer","text":"