Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2005
    Location
    Sydney, New South Wales, Australia
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have just installed MS Access 2007 having previously used 2002.
    2007 will run my .mdb files ok. It allows me to create .mde files.
    I can open a form ok provided there is no code in "On Load"
    However, even if I put one very simple line of code:-

    Private Sub Form_Load()
    Const dbg = False
    End Sub

    2007 displays the following error:-
    "the expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events"

    Thank you if you can help

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Have a look at the thread beginning with post.

    It describes this problem when both 2007 and 2003 (or 2002) are both installed on a Vista machine.

    Is that your situation?
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Jan 2005
    Location
    Sydney, New South Wales, Australia
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am running XP Pro.
    All of the references seem Ok. I am impressed that some version 10 references were automatically replaced with version 12.
    Unfortunately I do not yet have a solution. The problem exists only in 2007.
    Thanks

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Do databases with existing code work OK. If not it most likely is still a references issue - and you might encounter the problem John noted even if you are on XP Pro...
    Wendell

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    There are several standard things to try when you experience strange behaviour like this. I expect you have done some of these already.
    • Check the References
    • Compact and Repair
    • Use the Microsoft Jet Compact Utility http://support.microsoft.com/kb/273956
    • Decompile
      To run the 'decompile' option from Access you must open Access with a command line option of '/decompile', for example, run the following from a commandline:

      C:\Program Files\Microsoft Office\Office\MsAccess.exe /decompile C:\DatabasePath\FileName.mdb
    • Import all objects into a new empty database
    I can find quite a few references to the specific problem you are getting, but nearly always in the context of multiple versions of Access on the one machine.


    In this post we are told "I just removed the one embedded macro I had left and it seems to have fixed the problem."


    In this post it was fixed by uninstalling then reinstalling Access
    Regards
    John



Posting Permissions

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