Hello Guys,
I am facing an awkward run time error in a MS Access 2016 Form. I have a Form with a button. On clicking the button, it is expected to perform some processes (written in VBA code behind). But as soon as the button is clicked, VBA code starts to execute and an error message pops-out (with just a number and no error description).
By looking at the VBA code, I could track that the code starts to execute, and directly goes to the error handling section. Below is the top portion of the code:
################################################## ######
Private Sub cmdCA_Click()
Dim strMsg As String
Dim intIcon As Integer
Dim strTitle As String
Dim strCriteria As String
Dim strAddr As String
Dim strDoc As String
Dim strMSS As String
Dim db As DAO.Database
Dim rstEmail As DAO.Recordset
Dim rstStatus As DAO.Recordset
Const conAction As Long = 20
On Error GoTo Err_cmdCA_Click
.........
Other code here
.........
Exit_cmdCA_Click:
Exit Sub
Err_cmdCA_Click:
MsgBox "Error " & Err.Number & ": " & Err.Description, vbExclamation, _
"frmCorrectiveAction cmdCA_Click"
Resume Exit_cmdCA_Click
End Sub
################################################## ######
Any help will be appreciated. I can provide any additional details, if required.
Thank You.