I am having a recurring problem that causes the following error. "The expression On Change you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name." I have looked at previous copies of the database and it works fine. This problem came up out of nowhere. Do I just have a gremlin in the system, or is this an Access issue?
Code:
Private Sub cboConstraint_Change()
Dim strConstraintSQL As String
Dim strSummarySQL As String
Dim RstCount As Integer
Dim dtmStart As Date
Dim qdf As DAO.QueryDef
strConstraintSQL = ""
strConValue.RowSource = ""
RstCount = 0
If Me.cboRptType.Value <> "RCA Event Summary List" Then
Select Case Me.cboConstraint.Value
Case "Event Type"
strConstraintSQL = "SELECT DISTINCT RCAData1.Type FROM RCAData1 ORDER BY RCAData1.Type DESC;"
Case "Event Category"
strConstraintSQL = "SELECT DISTINCT RCAData1.Category FROM RCAData1 ORDER BY RCAData1.Category DESC;"
Case "Work Area/Cell"
strConstraintSQL = "SELECT DISTINCT RCAData1.AreaCell FROM RCAData1 ORDER BY RCAData1.AreaCell DESC;"
Case "Work Order #"
strConstraintSQL = "SELECT RCAData1.WorkOrderNo FROM RCAData1 ORDER BY RCAData1.DefectDate DESC;"
Case "Quality #"
strConstraintSQL = "SELECT RCAData1.QualityNo FROM RCAData1 ORDER BY RCAData1.DefectDate DESC;"
End Select
Else
'*** SQL for Summary Report
'strConstraintSQL = "SELECT (*) FROM RCAData1 WHERE
Me!cboConValue.BackColor = RGB(255, 255, 0)
Me!cboConValue.Value = "Multiple Records"
Me!cboConValue.Locked = True
End If
Me.cboConValue.RowSource = strContraintSQL
Me.cboConValue.Requery
End Sub
I have tried repair and compacting, commenting sections out, etc. All to no avail.
I had this problem before and it just went away. Any suggestions would be greatly appreciated.