Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    187
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Code disappears in Office Access 2007

    Hi,

    I am battleing something that is truly strange to me. I have a database that was developed in ACCESS 97 and converted to 2003 and again to 2007. Since converting to 2007, every few days the code on forms that resides in everything to buttons and other events disappears. The database basically becomes unusable. I have to go in and import all the forms with the code from a master copy to get it to work again. Has anyone been experiencing this? What could be some of the causes?

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Make sure that the database is in a Trusted Location.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    In Access 2007, you see the warning "Certain Content has been disabled....etc" unless the database is in a Trusted Location. Unless the user explicitly agrees to enable the content, all code is disabled.

    So the database behaves as if the code is not there. Click a button an nothing happens.

    So the question is: Are you sure that the code is completely gone? (have you gone into design view and looked at the code?) or is the database just behaving as if it is not there?
    Regards
    John



  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    New England (Connecticut)
    Posts
    187
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yes i specifically go into the design view of the form and look at for example the "On CLick" Event for a button. The vba is actually missing. It happens only on this database, i have four other that were converted and am not having any issues with them.

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    This is not an issue I have encountered.

    I have found a discussion here with a few suggestions that might help. The strong suggestion there is that if you have Compact on Close turned on, turn it off.

    Some general suggestions for dealing with strange Access behaviour:

    • Turn of Name Autocorrect
    • Compact and Repair
    • Decompile
    • Split the database, and give each user their own copy of the front end.
    Regards
    John



  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,519
    Thanks
    3
    Thanked 50 Times in 50 Posts
    I have not personally experienced this either, but I know individuals who have and they found it very frustrating. One question - what format is your database using - .accdb, 2000 mdb, 2002/2003 mdb? One other thing you might consider is deploying a compiled version (mde) and see if the code continues to disappear.
    Wendell

Posting Permissions

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