473,382 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Error message

abouddan
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 2093
Rabbit
12,516 Expert Mod 8TB
We might if you could post the code. But from the error message it sounds like you might have accidentally changed Private Sub ControlName_OnClick() to something else.
Mar 24 '07 #2
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
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 Expert 2GB
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
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
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...
9
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
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...
8
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...
10
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...
16
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:...
2
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: ...
2
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...
0
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.