Importing forms and VBA code into new database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cjbell
    New Member
    • Jan 2015
    • 2

    #1

    Importing forms and VBA code into new database

    I have a few forms that I need to import from one DB to another. I lose all of the event procedures that are linked to the controls when I do this. Any suggestions on best practices on moving/copying forms and the associated VBA event procedures to a new db.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3665

    #2
    cjbell,

    Welcome to Bytes.

    If the new DB is stripping all the code, you could just copy and paste the code into the new forms, but that is time-intensive if you have a lot of code, and that should not be the way it works. Is your new DB in a much different version of Access?

    I've not come across such problems in the past.

    Comment

    • jforbes
      Recognized Expert Top Contributor
      • Aug 2014
      • 1107

      #3
      How are you importing the Forms? When you are Importing the Form, are you Copy and Pasting the Form controls or are you using Ribbon|External Data|Access?

      I've never hear of it not including the VBA when performing an Import.

      Comment

      • cjbell
        New Member
        • Jan 2015
        • 2

        #4
        I moved these forms a while ago, I must have just copied and pasted the whole form, when I use the import function it works great! Thanks for the quick replies.

        Comment

        Working...