Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Poorly explained 'run time' error

Status
Not open for further replies.

thevillageinn

Technical User
Feb 28, 2002
124
US
I have an Access 97 database/application that was working not too long ago, then I made some sort of change just before I went to lunch and when I returned it no longer worked and I don't know what I did.

Here's the error I get.

" The expression On Load you entered as the event property setting produced the following error: Event Procedure declaration does not match description of event 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 error evaluating the function, event or macro. "

You can replace "On Load" with almost any other event...On Click, After Update, etc...They all don't work. The code in the event isn't the problem. I have commented it all out, and still get the same error. I tried adding some error handling, hoping to get the error message in a MsgBox, but to no avail.

I figure there must be a setting either on the form, or the database, or even globally that I set accidentally, or purposely that is preventing me from going any further.

Any and all suggestions are welcome. Thanks in advance-
-Dan
 
Hi Dan,

Ok, I've seen the error you mention, but in my case it was a problem with the code. Off the top of my head, Repair the DB and see if that helps, then if you've still got the issue, try some of these:

Go into design view and take the "[Event Proceedure]" line off all the events, so that all you're doing is opening the form raw. If that lets you get that far, try adding them back in one at a time and see where you get the error.

If that's a no-go, copy the whole form module into a blank general module and change the property "Has Module" on the form to "No" this will delete the module and remove ALL code (hence the copying in the beginning. See if that let's you open the form then try to add the code back in one proceedure at a time into the "New" module that Access will create for you.

Try these and let me know if you get any new messages or if there's any more info at all...

Kyle ::)
 
Kyle,
Thanks for your suggestions. I played with your ideas a bit yesterday afternoon, but didn't get anywhere. I am going to try copying and pasting the form and it's module, see where that goes, then i figure I can import the relevant objects into a new database...repair didn't do anything positive...

On the form I re-created the module, and as soon as the "On Load" setting had "Event Procedure" listed in the event section, I began to receive errors...there was no other code other than "On Load"

I guess I will just be persistent and keep you and everyone else posted on the changes.
-Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top