Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2012
    Posts
    3

    Unanswered: Need help regarding VBA

    Hi guys,

    I need your advice and help. I uploaded my accdb file in a server meant to be used by users across the network. Initially I can run the database but after some time when I opened the database again, it says:

    "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 backupcopy of the database, click Cancel. Then make a backup copy of the database.

    If you have a backup copy of the database, click OK. When the database opens, examine the modules to see that they are correct. If they are not, you should revert to a recent backup"

    I already made a copy of the database after clicking cancel. Then I Clicked "OK" and I get this message:

    "The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delete the VBA project"

    What should I do? What may have caused the error?
    I have attached the accdb file for your reference and testing.

    I appreciate all your help. Thank you.
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    In a multi-user environment, you need to split the database according to a Back-end/Front-end schema. You cannot safely work with an Access database in multi-user mode if the interface is shared. Sooner or later , the database becomes corrupted.

    One database file (the back-end) contains the tables and remains on the server while each client machine receives a copy of a second database file (the front-end) that contains all other objects (Queries, Forms, Reports, etc.). The front-end uses attached (linked) tables to the back-end.

    There's an Assistant (Wizard) is Access to help you slit the database. In Access 2003 you can find it by opening the "Tools" menu, then select "Database Splitter" in the "Database Utilities" submenu. In Access 2010, it's in the "Database Tools" ribbon.
    Have a nice day!

  3. #3
    Join Date
    Jan 2012
    Posts
    3
    Thanks for your advice, Sinndho.

    When I tried to split the database using the wizard, there is a prompt :

    "The search key was not found in any record."


    However the back end file was still created in the designated directory.Thou upon opening the file, there are no tables and blank interface.

    I seek your advice again. Thank you.

  4. #4
    Join Date
    Jan 2012
    Posts
    3
    Hi guys,

    Thanks for the advice.

    I found this link helpful: "http://support.microsoft.com/kb/304932#appliesto"

    By the way I read and understand the guidelines but encountered one problem. It seems that the 'Category' table cannot be imported into the back end database as there is an error 'Operation is not supported for this type of object.'Can you help me to take a look at the problem and rectify it if possible?

    By the way I did manage to create the front end database without problem. The only thing is upon opening the front end database, it did not load the login interface automatically.

    I have attached the front end and back end files for your reference.
    I seek your assistance. Thank You.
    Attached Files Attached Files

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    When I use the Database Splitter Assistant for creating a back-end and a front-end from your database, I don't have any problem and no error is reported. The difference could be that I used Access 2010 while you seems to be using the 2007 version. In any case, nothing prevents you from terminating the splitting process manually.
    Have a nice day!

Posting Permissions

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