Results 1 to 5 of 5
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding code

    I have made a copy of a form. Now when I write a code on the subform of the copied form the subform of the original form also gets affected.How can I avoid this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Sounds like you are using the same subform in both forms.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by pbaldy View Post
    Sounds like you are using the same subform in both forms.
    When I made a copy of the form I only changed the name of the main form as it was necessary to save it.Rest everything is the same.

  4. #4
    Join Date
    Apr 2017
    Posts
    1,673
    So you have to make a copy of form used as source for subform too. And then set new form as source of subform in second parent form. And don't forget to rename subform in second parent form, as having 2 subforms with identical names in different forms can cause problems later.

    NB! On parent form is subform control. Subform is not a form, it is a container. The child form is the source of subform container. The hierarchy is Parent Form > subform > Child Form.

  5. #5
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by ArviLaanemets View Post
    So you have to make a copy of form used as source for subform too. And then set new form as source of subform in second parent form. And don't forget to rename subform in second parent form, as having 2 subforms with identical names in different forms can cause problems later.

    NB! On parent form is subform control. Subform is not a form, it is a container. The child form is the source of subform container. The hierarchy is Parent Form > subform > Child Form.

    Thanks!!! It worked. God Bless You!

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

Similar Threads

  1. Replies: 20
    Last Post: 10-13-2015, 09:05 AM
  2. Replies: 3
    Last Post: 10-16-2014, 08:49 AM
  3. Replies: 2
    Last Post: 06-28-2013, 12:58 PM
  4. Replies: 7
    Last Post: 05-28-2013, 09:11 AM
  5. Replies: 1
    Last Post: 05-04-2013, 12:19 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