Results 1 to 2 of 2
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Moving control from one form to another in the same db

    I have attached two zip files that contain copies of the db in question. I wanted to convert all macros in my db except this that move through records.

    The only form in my db that have this phenomenon are

    frmEmail
    frmPersonnel
    frmProjectManagement

    I simply wanted to convert all macros on those forms to VBA code, with the exception of the previous and next records on the three forms.

    To avoid having to delete the previous and next on the forms after they were changed to VBA code, I created a new form - a dummy form. For each form I cut and pasted
    the controls from the form in question (one of the three shown above) onto the dummy form. I then made the macro to VBA conversion
    and then cut and pasted each set of controls for the form from the dummy form back on to the form in which it was originally.

    I knew from reading that a macro will go with the control during cut and paste. I was counting on this.

    This worked on the forms frmEmail and frmPersonnel, but it failed on my third attempt to do it on frmProjectManagement.

    As of now I cannot even open the frmProjectManagement without getting some error. If it does open it is just a little box asking for input.

    I am not sure why it worked on 2 forms and failed the third, but it did. As I said in the fails db simply opening frmProjectManagment creates a lot of errors.

    I followed the procedure exactly. In the fails db there is even my dummy form - form1.

    Why does it fail on frmProjectManagement and succeed on the others.



    Any help appreciated. thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,938
    wouldn't it be quicker just to convert all macros to vba. Then delete the vba for the controls you want to be controlled by macros and just recreate the macros? Recommend take a screenshot of each required macro before conversion to vba so you know all the various steps involved - and take a copy of the form or db first so you have a backup.

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

Similar Threads

  1. Replies: 4
    Last Post: 02-18-2016, 12:06 PM
  2. Replies: 6
    Last Post: 01-28-2013, 01:37 PM
  3. Replies: 3
    Last Post: 03-29-2012, 12:40 PM
  4. Replies: 1
    Last Post: 12-12-2011, 01:58 PM
  5. Enabling a control and moving to a new tab in vba
    By MuskokaMad in forum Programming
    Replies: 1
    Last Post: 03-14-2010, 05:30 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