Hi,
I recently have been tasked with adding a form to a MS database that allows users to enter information for calibrating tools. The tools are calibrated every certain amount of days (the number of days depends on the tool), and when they calibrate a tool, they need to update the tool's due date. Currently, there is an "Update Due Date" button on another form in the database (I did not create this form nor did I code the button - these were created in 2002). When clicked, it asks if I want to update the records, but when I click "yes," it does not update the due date. I am not great with VBA, but to me, it looks as though the button is opening query called "UpdateDueDate" (see code below), and in the query, it's updating the due date field by adding the number of days between calibrations (Cal_Int) to the old due date (Last_Cal_Date). Shown below is the code on the button and the actions performed in the query:
Code:
Private Sub Command63_Click()
On Error GoTo Err_Command63_Click
Dim stDocName As String
stDocName = "UpdateDueDate"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Command63_Click:
Exit Sub
Err_Command63_Click:
MsgBox Err.Description
Resume Exit_Command63_Click
End Sub
I have a feeling that the issue is because the code and query were created in 2002, and I am now trying to run it with MS Access 2016.