Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 02-14-2017, 06:35 PM   #1
exaccess
Newly Registered User
 
Join Date: Apr 2013
Posts: 287
Thanks: 50
Thanked 1 Time in 1 Post
exaccess is on a distinguished road
Procedure declaration does not match description of event

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"

exaccess is offline   Reply With Quote
Old 02-14-2017, 07:03 PM   #2
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,761
Thanks: 10
Thanked 1,289 Times in 1,227 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
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?...
Code:
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....
Code:
private sub form_open(cancel as long)
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.
__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
Old 02-14-2017, 07:04 PM   #3
Cronk
Newly Registered User
 
Join Date: Jul 2013
Posts: 2,132
Thanks: 3
Thanked 464 Times in 457 Posts
Cronk will become famous soon enough Cronk will become famous soon enough
Re: Procedure declaration does not match description of event

You can get that error if you add a parameter to an event procedure
eg
Private sub CommandButton_Click()

has a parameter added to it, as in

Private sub CommantButton(x as variant)

Cronk is offline   Reply With Quote
Reply

Tags
button , command , error message , not working

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
procedure declaration does not match description of event or procedure having the sam aziz rasul Modules & VBA 4 11-10-2016 09:21 AM
[SOLVED] Error - Procedure declaration does not match description of event or procedure ANP Modules & VBA 5 07-31-2014 06:35 AM
procedure declaration does not match description of event or procedure having the sam liamfitz Forms 6 02-13-2013 12:34 PM
Procedure declaration does not match description of event or procedure having same na liamfitz Modules & VBA 0 01-22-2013 06:41 AM
Compile Erro: Procedure declaration does not match description... ajetrumpet Modules & VBA 3 11-04-2009 01:59 PM




All times are GMT -8. The time now is 11:59 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World