Procedure declaration does not match description of event or proce

J

John Keith

The compile error occurs inside Access, the VBE never gets to the "stop"
statement.
The error pops up twice, once for each of these events. I have several
other fields on my form that have the same issue. One other date field using
the same two events and one text field that uses the AfterUpdate event...
these all have the exact same issue.

Here are the events tied to one first field that I have been focusing on to
try and resolve the error:
Private Sub DtOfResponse_GotFocus()
Stop
End Sub

Private Sub DtOfResponse_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Stop
End Sub

So far I have tried the following to resolve this error to no avail:
1) Checked references for any duplicates.
2) Renamed the event procedures and recreated them with the dropdowns from
the VBE to eliminate any possible mis-spelling or parameter declariations.
3) Started at the top form properties and checked every control's property
page to make sure that I did not have multiple events defined in error.
4) Commented out the events completely and deleted the event-property line
so that no event were called (the form works then, but with out performing
any events).
5) Deleted the procedures and recreated them using the "..." button on the
control-property page for the DtOfResponse field.
6) Compact and Repaired the database.

Still the error persists.

Using Office Access 2003 (11.8166.8172) SP3
Microsoft Office Professional Edition 2003
 
J

John Keith

Problem solved!

The error message was a goose-chase, one of the called procedures three
levels deep was mispelled. The event originally called another form as a
pop-up, that form''s event had a change to call a standard module routine
that was modified to accept a string value with the control name that would
ultimately be updated. Somehow those routines were still being connected in
the background at complie time. So even though I was only trying to stop at
the initial event call, the underlying events were needing a full compile.

Here is how I found it using tips on this link:
http://www.mcse.ms/message830485.html

1. Press Ctrl+G to open the Immediate window.
2. Choose Compile from the Debug menu.
Access will highlight the problem code.
3. Fix the problem, and repeat until the code compiles.

Hope this will help others that fall into the same trap.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top