473,949 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error message

abouddan
42 New Member
Hi all

I am using Access2000 and in some form I'm just adding a command button that close that form on the event OnClick. When running the code and when clicking on that button an error message appears like the one below.
After that I realized that every object that had an OnClick event or any other event the same message appears.
It says:

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.
*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
*There may have been an evaluating the function, event, or macro.

End of message.


Any Ideas?

[IMG]Error Message[/IMG]
Mar 24 '07 #1
5 2151
Rabbit
12,516 Recognized Expert Moderator MVP
We might if you could post the code. But from the error message it sounds like you might have accidentally changed Private Sub ControlName_OnC lick() to something else.
Mar 24 '07 #2
abouddan
42 New Member
The real situation is that I am creating a form based on a table. And in that form their are many textboxes and comboBoxes and I have a commandBox that has in On Click event : DoCmd.Close
And when I created that button I did it whith the creating wizard, so I changed nothing.
Mar 24 '07 #3
scolivas
56 New Member
Abouddan,

It looks like your wizard might be faulty.



in design view - right click on the button, and select properties.
select the event tab and check to see if the on click field is populated. if it is, click on the button at the end of the line w/...

you code should look like this with the exception of your button's name:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command36_Click()
  2. On Error GoTo Err_Command36_Click
  3.  
  4.  
  5.     DoCmd.Close
  6.  
  7. Exit_Command36_Click:
  8.     Exit Sub
  9.  
  10. Err_Command36_Click:
  11.     MsgBox Err.Description
  12.     Resume Exit_Command36_Click

if it says more than that...paste that data into the forum so we can see it.

Sophie

Hi all

I am using Access2000 and in some form I'm just adding a command button that close that form on the event OnClick. When running the code and when clicking on that button an error message appears like the one below.
After that I realized that every object that had an OnClick event or any other event the same message appears.
It says:

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.
*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
*There may have been an evaluating the function, event, or macro.

End of message.


Any Ideas?

[IMG]Error Message[/IMG]
Mar 24 '07 #4
missinglinq
3,532 Recognized Expert Specialist
I've received this message more than once when I've been careless about pasting code into my form's module. What happened was that I inadvertently pasted code for one Sub into the middle of another Sub! Access expects to see the begining of a Sub, some code for the Sub, then Sub End. Instead, in reading down the line, so to speak, it now sees the beginning of a Sub, the beginning of another Sub, then two Sub Ends, and this confuses it! I'd scan your code, starting with the OnClick Sub for command button you just created, for an occurrence such as this.
Mar 24 '07 #5
abouddan
42 New Member
Many thanks for the support

I think what Missinglinq said was the right answer for me. What I did is the following: I commented all the code (I put ' at the biginnig of every row) except the code of the command button the one that closes the form, and I run the programm and it went ok, then I did the same thing for all Private subs one by one until I found the 'infected' Sub. I deleted the code and re-wrote it, and that was very good. BTW I cleaned all unnecessary code in that form.
Mar 27 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
10847
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by the browser, followed by a descriptive error message: Microsoft VBScript runtime error '800a000b' Division by zero followed by the number of the error-making line
9
4925
by: Mairhtin O'Feannag | last post by:
Hello, We have two machines we wish to use DPF. They are both RH ES 2.1, with DB2 8.2. I read the documentation CAREFULLY, and added the following line to my db2nodes.cfg file : 1 egret 0
6
8495
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order by VisitDt" I'm getting this error message: Errno is 2465. Err.description is "Can't find field '|' referred to in your expression"
8
10036
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
10
8732
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an asp.net page. If I press OK then I get a page with this message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
16
2994
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In: http://www.mywebsite.org/WebResource.axd?d=5WvLfhnJp5Lc8WhQSD4gdA2&t=632614619884218750 -------------------------------------------------------------------------------- System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at...
2
5358
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
2
19527
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
10170
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11360
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10699
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9903
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7437
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6129
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4546
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3554
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.