Procedure declaration does not match description of event (1 Viewer)


Registered User
Apr 21, 2013
Below is the error message that I am getting each time I press a command button on a form called ConFedFm. I looked at the statements in the calling form and the called form , parameters passed, spellings etc. All look alright. Help is highly appreciated

"The expression On Click 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"


Super Moderator
Mar 17, 2004
You get this error in your code when you write an event handler that doesn't exactly match the event signature, so you know this event handler, right?...
private sub form_open(cancel as integer)
The event is called Open, it is raised by the Access.Form class, and it passes an integer. If you want to cause the error you are getting, write the handler as follows....
private sub form_open(cancel as [COLOR="Blue"]long[/COLOR])
In this case the signature of the event handler does not exactly match the signature of the event being raised. For some objects this error will be a compile error, but if you are getting this while using an active x object, it may be harder to find, like maybe this is the click event of a treeview control, which may not fail until you open the form that contains the control.
Hope this narrows it down a little...
If not, post the DB.


Registered User
Jul 4, 2013
You can get that error if you add a parameter to an event procedure
Private sub CommandButton_Click()

has a parameter added to it, as in

Private sub CommantButton(x as variant)

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom