Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Access bug?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Garret - 25 May 2007 14:24 GMT
I'm working with an Access2000 database.  I have a form with a
subform.  In the subform I have some code in the Form_Current event,
and in the main form I have code in the Load event, Before_Update, and
a few other spots.  All this was working fine and I was tweaking the
code a little to see results on the form and subform.  One of the
times, I changed a little code (like 1 line) and tried to open the
main form and got this message:

The expression On Load 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 error in evaluating the function, event, or
macro.

Surprised at the sudden error that had nothing to do with what I
changed, I still went back and removed the lines of code I had
placed.  However, I still got this message each time I tried to open
the form.  If I keep on pressing "OK", it still gets the form to open
up, but I notice that none of my events no longer run on the form or
the subform.

Thanks for any help
John W. Vinson - 25 May 2007 15:55 GMT
>I'm working with an Access2000 database.  I have a form with a
>subform.  In the subform I have some code in the Form_Current event,
[quoted text clipped - 11 lines]
>  *there may have been an error in evaluating the function, event, or
>macro.

If you look at the form's Properties, what *is* visible in the On Load event?
It should be literally and exactly

[Event Procedure]

It's also possible that your database is corrupted. Have you tried Compact and
Repair, or decompiling? If you don't have a backup, *MAKE ONE NOW*; and check
the suggestions at

http://www.granite.ab.ca/access/corruptmdbs.htm

            John W. Vinson [MVP]
Garret - 25 May 2007 16:10 GMT
On May 25, 10:55 am, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:

> >I'm working with an Access2000 database.  I have a form with a
> >subform.  In the subform I have some code in the Form_Current event,
[quoted text clipped - 24 lines]
>
>              John W. Vinson [MVP]

Hey John,

I really can't explain it, but the error went away after an hour of
vain investigation.
However, I do know that I had [Event Procedure] in the event
properties where I had an event being run.
I'll compact and repair it now, and hope for the best.  If anything
goes wrong, I'll post again.
david@epsomdotcomdotau - 26 May 2007 00:59 GMT
You can get that error if you change the procedure declaration
for one of the form or control events. For example, change

Private Sub Form_Open(Cancel As Integer)
   MsgBox "Hello"
End Sub

to
Private Sub Form_Open(Cancel As Integer,fred, fred)
   MsgBox "Hello"
End Sub

Access exposes a (callback) property which allows you
to attach methods to events. If you put [event procedure]
into that property, Access calls a standard method, using
a standard naming convention (The property is an unusual
Access property, which most ole objects don't have. Most
OLE objects just call standard methods, which you can
supply. You see this when you drop an OLE object on to
a form: most OLE objects have methods in the VBA window
which are not shown on the Access property sheet)

If you have another procedure with the same name as the
standard procedure,  but the procedure declaration does
not match, you get this error.

However, I would assume that a likely cause of this error
would be corruption of the compiled code. Even if your
source code has the correct declaration, if the compiled
code is corrupt, the compiled signature might not match
the calling signature. Decompile would probably fix that
problem.

(david)

> I'm working with an Access2000 database.  I have a form with a
> subform.  In the subform I have some code in the Form_Current event,
[quoted text clipped - 20 lines]
>
> Thanks for any help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.