Results 1 to 3 of 3
  1. #1
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138

    Recurring Change Event Erroe

    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.

  2. #2
    dccjr's Avatar
    dccjr is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Location
    Colorado Springs, CO
    Posts
    138
    I think that I solved the issue. Access keeps placing [Event Procedure] in the On Change part of the properties box. When I take this out, everything seems to work properly. Not sure why , though. If someone knows the underlying reason and how to prevent it, I am all ears.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If you take it out, the code wouldn't be running. Are you saying it is? What you're seeing is normal:

    http://www.baldyweb.com/FirstVBA.htm

    though I would use the after update event of the combo.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Change Text Box Data Source On Open Event
    By mcktigger in forum Programming
    Replies: 1
    Last Post: 01-18-2013, 12:24 PM
  2. Trying to fire event on record change
    By danielhowden in forum Forms
    Replies: 3
    Last Post: 05-13-2011, 06:30 AM
  3. Any change of focus on form Event?
    By trb5016 in forum Forms
    Replies: 1
    Last Post: 02-11-2011, 08:25 PM
  4. Using an event to change color of text.
    By michaeljohnh in forum Programming
    Replies: 3
    Last Post: 08-30-2010, 12:30 PM
  5. Replies: 3
    Last Post: 10-18-2009, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums