"Expression you entered..." Errors? 
Author Message
 "Expression you entered..." Errors?

I have been experiencing an increasing number of errors of the following
sort popping up in response to button clicks and even just mouse movement on
some of the forms in an Access application I'm developing. The messages are
similar to the following.

    The expression OnClick that you entered for the event procedure
    has resulted in the following error:    <various errors>

The errors cited seem to be either compile or runtime errors, e.g. "For with
no Loop..." or "Method not available for this object", etc.

Once the messages start, I must use the close (X) button to close the form,
since every button on the form results in the same error. At one time I
thought it might be either memory limitations or the failure of an earlier
execution, but the problem seems to be limited to only certain forms, even
after restarting Access or Windows. FWIW, there's usually a fair amount of
code behind each form.

I had also thought that it had something to do with the initialization of
forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't yet
characterized exactly the conditions under which it occurs.

Has anyone experienced this?

dds



Sat, 14 May 2005 23:21:57 GMT  
 "Expression you entered..." Errors?
Assuming that the code doesn't actually contain the errors about which
you're seeing the messages, then you may have a corrupted form. Copy all the
controls and paste them on a new form. Copy the code and paste it into the
new form's module. See if the new form works fine.

--
Hoping that this is helpful...
       Ken Snell
<MS ACCESS MVP>


Quote:
> I have been experiencing an increasing number of errors of the following
> sort popping up in response to button clicks and even just mouse movement
on
> some of the forms in an Access application I'm developing. The messages
are
> similar to the following.

>     The expression OnClick that you entered for the event procedure
>     has resulted in the following error:    <various errors>

> The errors cited seem to be either compile or runtime errors, e.g. "For
with
> no Loop..." or "Method not available for this object", etc.

> Once the messages start, I must use the close (X) button to close the
form,
> since every button on the form results in the same error. At one time I
> thought it might be either memory limitations or the failure of an earlier
> execution, but the problem seems to be limited to only certain forms, even
> after restarting Access or Windows. FWIW, there's usually a fair amount of
> code behind each form.

> I had also thought that it had something to do with the initialization of
> forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't
yet
> characterized exactly the conditions under which it occurs.

> Has anyone experienced this?

> dds



Sun, 15 May 2005 10:49:57 GMT  
 "Expression you entered..." Errors?
Ken,
I meant to reply earlier -- I did what you suggested, and the problem went
away. One thing that I wanted to do was see the class code associated with
the form (which is easy in VB), but I hadn't figured out how to do it. Is
there a way?
dds


Quote:
> Assuming that the code doesn't actually contain the errors about which
> you're seeing the messages, then you may have a corrupted form. Copy all
the
> controls and paste them on a new form. Copy the code and paste it into the
> new form's module. See if the new form works fine.

> --
> Hoping that this is helpful...
>        Ken Snell
> <MS ACCESS MVP>



> > I have been experiencing an increasing number of errors of the following
> > sort popping up in response to button clicks and even just mouse
movement
> on
> > some of the forms in an Access application I'm developing. The messages
> are
> > similar to the following.

> >     The expression OnClick that you entered for the event procedure
> >     has resulted in the following error:    <various errors>

> > The errors cited seem to be either compile or runtime errors, e.g. "For
> with
> > no Loop..." or "Method not available for this object", etc.

> > Once the messages start, I must use the close (X) button to close the
> form,
> > since every button on the form results in the same error. At one time I
> > thought it might be either memory limitations or the failure of an
earlier
> > execution, but the problem seems to be limited to only certain forms,
even
> > after restarting Access or Windows. FWIW, there's usually a fair amount
of
> > code behind each form.

> > I had also thought that it had something to do with the initialization
of
> > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't
> yet
> > characterized exactly the conditions under which it occurs.

> > Has anyone experienced this?

> > dds



Mon, 23 May 2005 04:53:18 GMT  
 "Expression you entered..." Errors?
Damn! It's happening again, and reconstructing the form and code doesn't
seem to be working. The exception message always says

The expression xxxx you entered as the event property setting produced the
following error: yyyyyyyyyy

xxx is always the event name, e.g., OnLoad, OnClick

yyyyyyyy is one of several error messages that one often gets, e.g. "Method
or data member not found"

These errors never seem to be relevant to any code around the beginning of
the associated event handler code.  It almost seems like all the code got
shifted such that the event name ends up in the first line of the actual
code of the handler.

The only thing I noticed that might be relevant (because IE cause me more
problems, hangs and crashes than any single program I use) was that I had
opened and used IE while I had the Access IDE and this specific form module
up for editing/testing. After finishing with IE, I returned to Access and
saved my form code. Then the problem came up again! Aarrgh!  What a royal
pain .... .   (I still suspect that the form class code has gotten munged
somehow.)

dds


Quote:
> I have been experiencing an increasing number of errors of the following
> sort popping up in response to button clicks and even just mouse movement
on
> some of the forms in an Access application I'm developing. The messages
are
> similar to the following.

>     The expression OnClick that you entered for the event procedure
>     has resulted in the following error:    <various errors>

> The errors cited seem to be either compile or runtime errors, e.g. "For
with
> no Loop..." or "Method not available for this object", etc.

> Once the messages start, I must use the close (X) button to close the
form,
> since every button on the form results in the same error. At one time I
> thought it might be either memory limitations or the failure of an earlier
> execution, but the problem seems to be limited to only certain forms, even
> after restarting Access or Windows. FWIW, there's usually a fair amount of
> code behind each form.

> I had also thought that it had something to do with the initialization of
> forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't
yet
> characterized exactly the conditions under which it occurs.

> Has anyone experienced this?

> dds



Mon, 23 May 2005 05:55:09 GMT  
 "Expression you entered..." Errors?
Do you know if you have all the correct references for this?

Rebecca


Quote:
> Damn! It's happening again, and reconstructing the form and code doesn't
> seem to be working. The exception message always says

> The expression xxxx you entered as the event property setting produced the
> following error: yyyyyyyyyy

> xxx is always the event name, e.g., OnLoad, OnClick

> yyyyyyyy is one of several error messages that one often gets, e.g.
"Method
> or data member not found"

> These errors never seem to be relevant to any code around the beginning of
> the associated event handler code.  It almost seems like all the code got
> shifted such that the event name ends up in the first line of the actual
> code of the handler.

> The only thing I noticed that might be relevant (because IE cause me more
> problems, hangs and crashes than any single program I use) was that I had
> opened and used IE while I had the Access IDE and this specific form
module
> up for editing/testing. After finishing with IE, I returned to Access and
> saved my form code. Then the problem came up again! Aarrgh!  What a royal
> pain .... .   (I still suspect that the form class code has gotten munged
> somehow.)

> dds



> > I have been experiencing an increasing number of errors of the following
> > sort popping up in response to button clicks and even just mouse
movement
> on
> > some of the forms in an Access application I'm developing. The messages
> are
> > similar to the following.

> >     The expression OnClick that you entered for the event procedure
> >     has resulted in the following error:    <various errors>

> > The errors cited seem to be either compile or runtime errors, e.g. "For
> with
> > no Loop..." or "Method not available for this object", etc.

> > Once the messages start, I must use the close (X) button to close the
> form,
> > since every button on the form results in the same error. At one time I
> > thought it might be either memory limitations or the failure of an
earlier
> > execution, but the problem seems to be limited to only certain forms,
even
> > after restarting Access or Windows. FWIW, there's usually a fair amount
of
> > code behind each form.

> > I had also thought that it had something to do with the initialization
of
> > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't
> yet
> > characterized exactly the conditions under which it occurs.

> > Has anyone experienced this?

> > dds



Mon, 23 May 2005 10:24:50 GMT  
 "Expression you entered..." Errors?
I'm not positive, although I'm pretty sure I'm not using anything (e.g.
ActiveX components) that I'm not using in other modules in the project.

However, I discovered that the problem went away, not by reconstructing the
module but by rebooting!  I just reconfirmed the problem; I was running IE
(to check this newsgroup among other things), after which I fired up Access
and my project and tried to run the problem form -- voila!  As soon as I get
done with this session, I'm going to reboot and try again. (First, though,
I'm going to check the MS site to see if there are any reports on this
nonsense. I haven't applied the latest cumulative patch yet, and maybe I'll
find it solves all my problems and finds me the woman of my dreams. :-)

Thanks for the suggestion. I'll still check the references. (Come to think
of it -- how do you do that? I've gotten no error messages indicating
missing references. Will compiling tell me?  (Interestingly, I *did* drop a
few references several days ago, but I was sure they weren't being used.)

dds

dds

Quote:
> Do you know if you have all the correct references for this?

> Rebecca



> > Damn! It's happening again, and reconstructing the form and code doesn't
> > seem to be working. The exception message always says

> > The expression xxxx you entered as the event property setting produced
the
> > following error: yyyyyyyyyy

> > xxx is always the event name, e.g., OnLoad, OnClick

> > yyyyyyyy is one of several error messages that one often gets, e.g.
> "Method
> > or data member not found"

> > These errors never seem to be relevant to any code around the beginning
of
> > the associated event handler code.  It almost seems like all the code
got
> > shifted such that the event name ends up in the first line of the actual
> > code of the handler.

> > The only thing I noticed that might be relevant (because IE cause me
more
> > problems, hangs and crashes than any single program I use) was that I
had
> > opened and used IE while I had the Access IDE and this specific form
> module
> > up for editing/testing. After finishing with IE, I returned to Access
and
> > saved my form code. Then the problem came up again! Aarrgh!  What a
royal
> > pain .... .   (I still suspect that the form class code has gotten
munged
> > somehow.)

> > dds



> > > I have been experiencing an increasing number of errors of the
following
> > > sort popping up in response to button clicks and even just mouse
> movement
> > on
> > > some of the forms in an Access application I'm developing. The
messages
> > are
> > > similar to the following.

> > >     The expression OnClick that you entered for the event procedure
> > >     has resulted in the following error:    <various errors>

> > > The errors cited seem to be either compile or runtime errors, e.g.
"For
> > with
> > > no Loop..." or "Method not available for this object", etc.

> > > Once the messages start, I must use the close (X) button to close the
> > form,
> > > since every button on the form results in the same error. At one time
I
> > > thought it might be either memory limitations or the failure of an
> earlier
> > > execution, but the problem seems to be limited to only certain forms,
> even
> > > after restarting Access or Windows. FWIW, there's usually a fair
amount
> of
> > > code behind each form.

> > > I had also thought that it had something to do with the initialization
> of
> > > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I
haven't
> > yet
> > > characterized exactly the conditions under which it occurs.

> > > Has anyone experienced this?

> > > dds



Mon, 23 May 2005 14:22:00 GMT  
 "Expression you entered..." Errors?
Just go to Tools, References and see if any are listed as missing.  I don't
know if there is a procedure, though to check for missing references.  :)

And with regard to compiling, I always do that automatically now on exit, as
well as compacting.


Quote:
> I'm not positive, although I'm pretty sure I'm not using anything (e.g.
> ActiveX components) that I'm not using in other modules in the project.

> However, I discovered that the problem went away, not by reconstructing
the
> module but by rebooting!  I just reconfirmed the problem; I was running IE
> (to check this newsgroup among other things), after which I fired up
Access
> and my project and tried to run the problem form -- voila!  As soon as I
get
> done with this session, I'm going to reboot and try again. (First, though,
> I'm going to check the MS site to see if there are any reports on this
> nonsense. I haven't applied the latest cumulative patch yet, and maybe
I'll
> find it solves all my problems and finds me the woman of my dreams. :-)

> Thanks for the suggestion. I'll still check the references. (Come to think
> of it -- how do you do that? I've gotten no error messages indicating
> missing references. Will compiling tell me?  (Interestingly, I *did* drop
a
> few references several days ago, but I was sure they weren't being used.)

> dds

> dds


> > Do you know if you have all the correct references for this?

> > Rebecca



> > > Damn! It's happening again, and reconstructing the form and code
doesn't
> > > seem to be working. The exception message always says

> > > The expression xxxx you entered as the event property setting produced
> the
> > > following error: yyyyyyyyyy

> > > xxx is always the event name, e.g., OnLoad, OnClick

> > > yyyyyyyy is one of several error messages that one often gets, e.g.
> > "Method
> > > or data member not found"

> > > These errors never seem to be relevant to any code around the
beginning
> of
> > > the associated event handler code.  It almost seems like all the code
> got
> > > shifted such that the event name ends up in the first line of the
actual
> > > code of the handler.

> > > The only thing I noticed that might be relevant (because IE cause me
> more
> > > problems, hangs and crashes than any single program I use) was that I
> had
> > > opened and used IE while I had the Access IDE and this specific form
> > module
> > > up for editing/testing. After finishing with IE, I returned to Access
> and
> > > saved my form code. Then the problem came up again! Aarrgh!  What a
> royal
> > > pain .... .   (I still suspect that the form class code has gotten
> munged
> > > somehow.)

> > > dds



> > > > I have been experiencing an increasing number of errors of the
> following
> > > > sort popping up in response to button clicks and even just mouse
> > movement
> > > on
> > > > some of the forms in an Access application I'm developing. The
> messages
> > > are
> > > > similar to the following.

> > > >     The expression OnClick that you entered for the event procedure
> > > >     has resulted in the following error:    <various errors>

> > > > The errors cited seem to be either compile or runtime errors, e.g.
> "For
> > > with
> > > > no Loop..." or "Method not available for this object", etc.

> > > > Once the messages start, I must use the close (X) button to close
the
> > > form,
> > > > since every button on the form results in the same error. At one
time
> I
> > > > thought it might be either memory limitations or the failure of an
> > earlier
> > > > execution, but the problem seems to be limited to only certain
forms,
> > even
> > > > after restarting Access or Windows. FWIW, there's usually a fair
> amount
> > of
> > > > code behind each form.

> > > > I had also thought that it had something to do with the
initialization
> > of
> > > > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I
> haven't
> > > yet
> > > > characterized exactly the conditions under which it occurs.

> > > > Has anyone experienced this?

> > > > dds



Mon, 23 May 2005 14:33:14 GMT  
 "Expression you entered..." Errors?
Hello Dennis,
I have had this problem for quite  some time. I recently discovered that if
I built a form added a control i.e. combo,  set some code to the
cbo_OnChange event and then changed the name of the event to cbo_AfterUpdate
by editing the name of the event, (instead of using the Properties dialogue
or event combo in the VBA IDE to initiate the code stub) I would then get
the error you describe.
I had done this very early on in the life of the form, and in subsequent
changes to the design of the form the error would occasionally appear again.
Once I had found the offending control, deleted the code associated to it
and then re-initialised the code stub the problem went away.
I have had it happen with combos and text boxes. It hasn't happened since
discovering the problem.
HTH, Ed.
--

  ,-._|\     Ed Adamthwaite
 /  Oz  \  Victoria, Australia.
 \_,--.x/   Remove "SpamMeNot" to reply
         v


Quote:
> Damn! It's happening again, and reconstructing the form and code doesn't
> seem to be working. The exception message always says

> The expression xxxx you entered as the event property setting produced the
> following error: yyyyyyyyyy

> xxx is always the event name, e.g., OnLoad, OnClick

> yyyyyyyy is one of several error messages that one often gets, e.g.
"Method
> or data member not found"

> These errors never seem to be relevant to any code around the beginning of
> the associated event handler code.  It almost seems like all the code got
> shifted such that the event name ends up in the first line of the actual
> code of the handler.

> The only thing I noticed that might be relevant (because IE cause me more
> problems, hangs and crashes than any single program I use) was that I had
> opened and used IE while I had the Access IDE and this specific form
module
> up for editing/testing. After finishing with IE, I returned to Access and
> saved my form code. Then the problem came up again! Aarrgh!  What a royal
> pain .... .   (I still suspect that the form class code has gotten munged
> somehow.)

> dds



> > I have been experiencing an increasing number of errors of the following
> > sort popping up in response to button clicks and even just mouse
movement
> on
> > some of the forms in an Access application I'm developing. The messages
> are
> > similar to the following.

> >     The expression OnClick that you entered for the event procedure
> >     has resulted in the following error:    <various errors>

> > The errors cited seem to be either compile or runtime errors, e.g. "For
> with
> > no Loop..." or "Method not available for this object", etc.

> > Once the messages start, I must use the close (X) button to close the
> form,
> > since every button on the form results in the same error. At one time I
> > thought it might be either memory limitations or the failure of an
earlier
> > execution, but the problem seems to be limited to only certain forms,
even
> > after restarting Access or Windows. FWIW, there's usually a fair amount
of
> > code behind each form.

> > I had also thought that it had something to do with the initialization
of
> > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I haven't
> yet
> > characterized exactly the conditions under which it occurs.

> > Has anyone experienced this?

> > dds



Mon, 23 May 2005 08:35:49 GMT  
 "Expression you entered..." Errors?
Sorry to have not closed the loop on this. It ends up that it was actually a
compile error, and I think it was due to a missing reference -- just like
you all said.  One of the related problems I have is that I tend to leave a
backup copy of some module in the database, and that plays hock with
attempts to compile the whole thing.

I've started having new problems, but I'll leave that for a new thread. (I'm
starting to have a love-hate relationship with Access, although the balance
remains in the former category.

Thanks again.

dds


Quote:
> Just go to Tools, References and see if any are listed as missing.  I
don't
> know if there is a procedure, though to check for missing references.  :)

> And with regard to compiling, I always do that automatically now on exit,
as
> well as compacting.



> > I'm not positive, although I'm pretty sure I'm not using anything (e.g.
> > ActiveX components) that I'm not using in other modules in the project.

> > However, I discovered that the problem went away, not by reconstructing
> the
> > module but by rebooting!  I just reconfirmed the problem; I was running
IE
> > (to check this newsgroup among other things), after which I fired up
> Access
> > and my project and tried to run the problem form -- voila!  As soon as I
> get
> > done with this session, I'm going to reboot and try again. (First,
though,
> > I'm going to check the MS site to see if there are any reports on this
> > nonsense. I haven't applied the latest cumulative patch yet, and maybe
> I'll
> > find it solves all my problems and finds me the woman of my dreams. :-)

> > Thanks for the suggestion. I'll still check the references. (Come to
think
> > of it -- how do you do that? I've gotten no error messages indicating
> > missing references. Will compiling tell me?  (Interestingly, I *did*
drop
> a
> > few references several days ago, but I was sure they weren't being
used.)

> > dds

> > dds


> > > Do you know if you have all the correct references for this?

> > > Rebecca



> > > > Damn! It's happening again, and reconstructing the form and code
> doesn't
> > > > seem to be working. The exception message always says

> > > > The expression xxxx you entered as the event property setting
produced
> > the
> > > > following error: yyyyyyyyyy

> > > > xxx is always the event name, e.g., OnLoad, OnClick

> > > > yyyyyyyy is one of several error messages that one often gets, e.g.
> > > "Method
> > > > or data member not found"

> > > > These errors never seem to be relevant to any code around the
> beginning
> > of
> > > > the associated event handler code.  It almost seems like all the
code
> > got
> > > > shifted such that the event name ends up in the first line of the
> actual
> > > > code of the handler.

> > > > The only thing I noticed that might be relevant (because IE cause me
> > more
> > > > problems, hangs and crashes than any single program I use) was that
I
> > had
> > > > opened and used IE while I had the Access IDE and this specific form
> > > module
> > > > up for editing/testing. After finishing with IE, I returned to
Access
> > and
> > > > saved my form code. Then the problem came up again! Aarrgh!  What a
> > royal
> > > > pain .... .   (I still suspect that the form class code has gotten
> > munged
> > > > somehow.)

> > > > dds



> > > > > I have been experiencing an increasing number of errors of the
> > following
> > > > > sort popping up in response to button clicks and even just mouse
> > > movement
> > > > on
> > > > > some of the forms in an Access application I'm developing. The
> > messages
> > > > are
> > > > > similar to the following.

> > > > >     The expression OnClick that you entered for the event
procedure
> > > > >     has resulted in the following error:    <various errors>

> > > > > The errors cited seem to be either compile or runtime errors, e.g.
> > "For
> > > > with
> > > > > no Loop..." or "Method not available for this object", etc.

> > > > > Once the messages start, I must use the close (X) button to close
> the
> > > > form,
> > > > > since every button on the form results in the same error. At one
> time
> > I
> > > > > thought it might be either memory limitations or the failure of an
> > > earlier
> > > > > execution, but the problem seems to be limited to only certain
> forms,
> > > even
> > > > > after restarting Access or Windows. FWIW, there's usually a fair
> > amount
> > > of
> > > > > code behind each form.

> > > > > I had also thought that it had something to do with the
> initialization
> > > of
> > > > > forms in a sequence (e.g. Form1 opens Form2 opens Form3), but I
> > haven't
> > > > yet
> > > > > characterized exactly the conditions under which it occurs.

> > > > > Has anyone experienced this?

> > > > > dds



Tue, 07 Jun 2005 03:35:34 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Error messages "VBA Expression Service"/N16.DLL missing

2. Regular Expression - "Library not registered Error"

3. Writing "Time" expressions

4. Regular Expression - how to do "AND"

5. Help with "simple" regular expression

6. "not match" in Regular Expressions (ASP)

7. "Enter Parameter Value" window in A97

8. Control "Enter" event

9. Disable "ENTER" key in text box

10. need help with "enter" key

11. send "ENTER" to Word

12. Put "enter" on TextBox

 

 
Powered by phpBB® Forum Software