• MS Access 2007 form.Load

    Author
    Topic
    #466093

    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

    Viewing 3 reply threads
    Author
    Replies
    • #1206451

      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?

    • #1206456

      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

    • #1206521

      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…

    • #1206553

      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 FilesMicrosoft OfficeOfficeMsAccess.exe /decompile C:DatabasePathFileName.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

    Viewing 3 reply threads
    Reply To: MS Access 2007 form.Load

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: