Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Event Error (Access 2007)

    For the past three days I have been getting the error 'The expression On Open you entered as the event property setting produced the following error: Object or class does not support the set of events.'
    Each time I would have to fall back to my back-up copy and start over. The code in error was previously running and in most cases all I did was enlarge a field or reposition it. I searched for a solution and did not find one..

    However this seems to be working for me now.


    1. <LI>Open the failing form or report in design mode
      <LI>Open the event procedure for 'On Open'
      <LI>Copy the Code
      <LI>Delete the 'On Open' event (from beginning to end sub)
      <LI>Go back to the Property Sheet for the failing form and select 'Event procedure' from drop down or double click
      <LI>Click the ellipsis (three dots) to open a new 'OnOpen' event
      <LI>Paste the original Code
      <LI>Compile and Save
    Hope this helps.

    If any knows why this might be happening please let me know.
    Attached Images Attached Images
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Event Error (Access 2007)

    The Visual Basic Editor stores hidden information, for example about the use of variables etc.
    Sometimes this hidden information becomes corrupt.
    Completely removing the offending code helps to get rid of the hidden information. Typing or pasting the code back in forces the Visual Basic Editor to compile the hidden stuff from scratch.

    Another method that sometimes helps is to decompile the code, then recompile it (see the thread starting at <post:=44,571>post 44,571</post:>).

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Event Error (Access 2007)

    Thanks Hans
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •