Results 1 to 7 of 7

Thread: On Load error

  1. #1
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    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!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    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!

    My Systems: Desktop Specs
    Laptop Specs

  5. #5
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Both machines are now giving me the problem. Both machines are Running Access 2003. The file extension is .mdb

    Many thanks

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    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?
    Wendell

  7. #7
    New Lounger
    Join Date
    Jul 2010
    Location
    London
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

Posting Permissions

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