error mesaj

F

Florin

What can I do, because I have a form with control and I get error mesage:

"The expression After Update you entered as the event property setting
produced the following error :
* The expression may not result in the name of a macro, the name of a
used-defined
function, or [Event Procedure].
* There may have beeen an error avaluating the function, event, or
macro."
 
T

Tom Wickerath

To add some to Keith's answer, try opening any code module. Then click on:

Debug > Compile ProjectName

where ProjectName is the name of your VBA project (likely the same as the
name of your database, but it can be different). Make sure that you do not
receive any compile errors. If you do, then these need to be fixed first.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

Keith Willcocks said:
I am not an expert but I did experience this. It turned out that I had an
error in the Event Procedure coding. The last sentence in the error
message was the one that applied. Have you tried setting a break point at
the very beginning of the code (if it is code) that your control calls?
Then you may be able to step through line by line with F8 until you see
where the error occurs. Otherwise look for errors in the Macro or Query
that it calls. Can't help any further I am afraid.
--
Keith Willcocks
(If you can't laugh at life, it ain't worth living!) __________________________________________

Florin said:
What can I do, because I have a form with control and I get error mesage:

"The expression After Update you entered as the event property setting
produced the following error :
* The expression may not result in the name of a macro, the name of a
used-defined
function, or [Event Procedure].
* There may have beeen an error avaluating the function, event, or
macro."
 
F

Florin

This message occurs when I introduce an LABEL in a form.
it's very strange

Thanks

Florin
 
T

Tom Wickerath

In that case, it sounds like you have a corrupt form. You can try doing a
compact and repair (Tools > Database Utilities > Compact and repair database
in Access 2003 and prior versions, or Office Button > Manage > Compact and
repair database in Access 2007), but I wouldn't hold out too much hope of
this fixing the problem.

Do you have a known good backup copy of your database that includes this
form? If not, how difficult would it be to rebuild this form from scratch?
There are techniques available to try to recover a corrupt form, using the
undocumented SaveAsText / LoadFromText commands, but it is easier if you can
simply import a copy from a known good backup. I would try the following
procedure:

Create a brand new database and immediately disable the NameAutocorrect
feature (see: http://allenbrowne.com/bug-03.html for reasons why you want to
do this). Then import all objects from the suspect database into the new
database, one group at a time. In other words, import all tables (but not any
linked tables), then import all queries, then all forms, etc. It is best to
import the form in question from a known good backup copy, rather than from
the same database that you are importing everything else. While Access will
allow you to import all objects in one operation, the experts at FMS, Inc. (a
Microsoft Partner), have stated that it is best to import objects one group
at a time (Reference: http://www.fmsinc.com/ubb/Forum12/HTML/000285.html).

Recreate any linked tables from scratch. Access can cache a lot of
information about linked tables, which may no longer be valid, so it's always
best to recreate the linked tables from scratch. When importing local tables,
make sure to check the option to import relationships, menus and toolbars,
and import/export specs. If any objects in the source DB are hidden, you'll
need to first unhide them. You will need to set the checked references to
match the source database, along with any startup options set under Tools >
Startup (or Office Button > Access Options...> Current Database in Access
2007).

Going through this process often times solves corruption problems, because
you get a new set of the hidden system tables (the tables whose names start
with "MSYS"). These system tables are updated appropriately as you import
objects. This may sound like a lot of work, but it really isn't. Creating a
new container DB, disabling NameAutocorrect, importing all objects one group
at a time, re-establishing any linked tables, setting startup options, and
setting references to match the source DB is usually a fairly quick
procedure. When you are in the Visual Basic Editor, in order to check that
the references match the source DB, you should do a Debug > Compile
ProjectName as well.




Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
F

Florin

Hi,

Thank you very muth for your answer!
I try all , but error mesage continue.

My problem is in an another place and have more reason?
My database is under construction and error mesage appears when I try
introduce a label in a form!

If you want, I sent my database at your email address for you see , because
that it's very
important for me.

Florin
Romania
 
T

Tom Wickerath

Hi Florin,
I try all, but error message continue.

Did you try importing all objects *except* the form in question, and then
rebuilding this form from scratch? Was this problem on only one form or on
all forms? If it was on only one form, then I would think that rebuilding
the form from scratch, in the newly created database, would solve the
problem. If the form is really complex, and you do not have a known good
backup, then we can try recovering your existing form. But this is likely
more work than just creating a new form, if your form is relatively simple.
If you want, I sent my database at your email address for you see, because
that it's very important for me.

I'm sure your application is very important to you. You can try sending it
to me but, honestly, I'll likely run into nasty Code Page errors, since I
have my default language set to English.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
F

Florin

- this problem is only one form
- I importing all objects *except* the form in question, and then
rebuilding this form
- Rebuilding: - in a blank form, I copy/paste a complex list box(search
into a query ) ,
- I introduce a text box in a form , and I delete
attach label
** hereunto , everything is ok
- when I put a new label box , i get error mesage

BUT, I try and solution is rename the label!!!! Of course, is
very strange!


In Visual Basic, It's important position of references (in Tools /
References) ?

Thans
Florin
 
T

Tom Wickerath

It is a strange problem. I've never heard of an error that occurs simply by
adding a new label to a form. So, this error continues, even though you
rebuilt this form from scratch? You were not working on an imported copy
(which may have been corrupted prior to importing it)?
In Visual Basic, It's important position of references (in Tools /
References) ?

Reference position can be important if the developer has failed to fully
qualify the reference, however, this usually results in a run-time error (for
example, error 13: Type Mismatch). The code will generally compile fine, but
then an error is thrown at run-time. This would not cause the problem that
you have reported. I have an article available that discusses this problem,
and shows how to use methods without having to worry about the priority of
references. Check out this article:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/ado_and_dao.html


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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