Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2008
    Posts
    150

    Unanswered: Module VBA Issue

    Hello Access Experts,

    I have a Microsoft Access database that has 4 users and is on a shared server.

    Recently, the users are receiving the following message.

    “The VBA modules in this database appear to have been saved with errors. Access can recover the modules, but you should backup the database first. To cancel so you can make a backup copy of the database, click Cancel. Then make a backup copy of the database.”When I reopen the database, the code has been wiped out.

    I don’t have any modules in my database, so I don’t understand why the code is removed from my form’s buttons.

    What the heck is going on. :-)

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    file corruption would be my guess. you may need to do a comapct and repair on a copy, and possibly after that use the jet utilities to decompile the project
    code is stored as modules internally.

    do you use a split back end and front end model
    back end contains the data and common queries
    front end contains the user interface (forms, reports and user specific queries)
    ideally each user should have thir own copy of the front end, ideally deployed on their desktop / own computer. there's stuff int he code bank to make sure users are using the most recent version of the front end

    then open a code window and compile the code, clear any errors that present
    don't allow users edit access to applications. deploy the front end as a MDE or ACCDE not MDB/ACCDB but make certain you reatin your MDB/ACCCDE fro development work

    invest in backuyps, and prove your backups are good
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2008
    Posts
    150
    Thank you. I thought I may have to split the front/backend. I need to learn how to do it and then go from there. I will reserach it on the net. Thanks again. :-)

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by mlrnet View Post

    ...I thought I may have to split the front/backend...
    No question about it! Having multiple users sharing a single, non-split database, sitting on a network drive is the sure way to repeated episodes of corruption, speed and timing problems, and all manner of strange, odd and curious behavior, including the problem you're having, now! Multiple users simply have to work off of a split database, with each user having their own copy of the Front End, which contains everything except the data/tables, on their respective hard drives, and a Back End with only the Tables on a shared drive.

    Being in forced retirement, I spend 8-10 hours a day here and on other Access forums/newsgroups, and over the past eight years have seen literally dozens and dozens of reports of non-split databases causing these kinds of problems as well as massive data lose! The really insidious thing is that a non-split app can work for extended periods of time before the troubles begin! But once it does, they become chronic, which is to say they occur over and over and over again!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Sep 2008
    Posts
    150
    Missingling,

    Thank you. I took the suggestion of healdem and split the database. Hopefully, this will eliminate the corruption issue.

    I appreciate your response and suggestions. Btw, I hope you enjoy your retirement.

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Thank you! Good luck with your project!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Sep 2008
    Posts
    150
    Missingling,

    Question. When I split the database, should it be split on the server that the users are all using? If so, do the users need to all be mapped to the same that I used to split the database?

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    The Back End, containing the Tables, needs to be on a server, with a copy of the Front End, with everything else, on each user's PC.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    Join Date
    Sep 2008
    Posts
    150
    Okay, I have done that. I split the database on the server and asked the users to copy the front end on to their desktops. The user is receiving an error message "P:\Project\PM DB_be.accdb' is not a valid path". Does that mean that all of the users must be mapped to the same "P" drive that the back in in residing on?

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Map to a server share for preference.
    \\servername\path\to\access\file.ext


    If you must use a drive specification then that drive letter must be the same.

    Thete is code to dynamically relink to a back end. Think its in the codebank, but if not have a look in the AccessDeveloper handbook
    Last edited by healdem; 10-27-14 at 20:27.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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