Results 1 to 6 of 6
  1. #1
    hlcarlin is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    12

    Transferring VBA functions from one database to another?


    Hey,

    I just had some sort of critical error while loading my database and I seem to have lost all VBA functions that were programmed and made the forms I had function properly. I have not lost any tables, queries, forms or reports, simply the code that powers form buttons.

    I have these VBA functions backed up on another (much older) version of the database I am working on and was wondering if there is a way I can export all of them to the newer version of my database?

    Thank you

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Start by *importing* everything into a fresh new db and see if the problem follows: http://www.btabdevelopment.com/ts/impnew

  3. #3
    hlcarlin is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    12
    Hello and thank you for your reply.

    I have tried doing what you recommended and everything works as it did on the file I have but the action buttons remain non-functional. When I right click on one and select Build Event, Microsoft Visual Basic opens up and the function is empty as opposed to my backup file where the function is still there and the buttons work properly.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You should be able to *import* the form from a prior backup.

  5. #5
    hlcarlin is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    12
    yes I believe that is the best solution thank you very much!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can also open both db's and copy and paste the Form's Class code if you want. You may then need to go through the Ecent tab and put in the [Event Procedure] to activate the code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 04-12-2011, 07:46 AM
  2. Transferring text within quotation marks
    By Lynette in forum Access
    Replies: 6
    Last Post: 11-24-2010, 11:58 AM
  3. Absolute beginner qu - transferring a database
    By kirstywing in forum Access
    Replies: 2
    Last Post: 09-07-2010, 02:12 AM
  4. Need help on transferring found record
    By awsmitty in forum Access
    Replies: 1
    Last Post: 01-22-2010, 09:11 PM
  5. Transferring Individual Records
    By bazillion in forum Programming
    Replies: 0
    Last Post: 01-25-2008, 12:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums