• On Load error

    Author
    Topic
    #472734

    Hi

    I’m getting the following error when I try and open a form

    “The expression On Load you entered as the event property setting produced the following error: Invalid data format.”

    When I try and view the code behind this form a message box says “Invalid Data Format”

    Any suggestions would be great.

    Thanks

    Amanda

    Viewing 5 reply threads
    Author
    Replies
    • #1252975

      Amanda,

      Don’t attempt to open the form.
      After you start the DB press Alt+F11 to open the Visual Basic Editor {VBE}.
      In the Project Explorer on the left, find the form in question.
      Right click on the form and select View Code.
      Look for the On_Load Event Procedure to view the code.

      Good Luck.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1252982

      Thanks Retired Geek

      I tried doing that but got the error

      “File format no longer supported”

      The only thing i can think is that I have opened the database on a windows 7 pc and I normally work on a windows xp machine.

      Any other suggestions would be welcome

    • #1253003

      Amanda,

      1. Which machine is giving you the problem, XP or Win 7?
      2. What versions of Access are on each machine, i.e. 2003, 2007, 2010?
      3. What is the current extension on the database file, ex: .mdb or .accdb?

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1253509

      Both machines are now giving me the problem. Both machines are Running Access 2003. The file extension is .mdb

      Many thanks

    • #1253544

      Is it possible that you are dealing with a database that was originally created in Access 2, 95 or 97 and has not been converted to the 2000 format? If not, have you done a Compact and Repair on the database?

    • #1253548

      Hi Wendell

      It is possible that the db was created in an earlier version.

      Looking at some of the code on a form I have

      DoCmd.RunCommand acCmdRemoveFilterSort

      which I have now replaced with

      Me.FilterOn = False

      and I am attempting to rebuild the form

      Many thanks

      Amanda

    Viewing 5 reply threads
    Reply To: On Load error

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

    Your information: