Copy/paste fields in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NewtoAccess
    New Member
    • May 2007
    • 32

    Copy/paste fields in a form

    I have a MAINFORM with a Subform1 which has another subform2.

    I want to copy the 'PORT_ID' field from subform2 and paste it to MAINFORM field called 'PORTA'.

    I was thinking of having a button in subform2 which would copy and paste all at once.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by NewtoAccess
    I have a MAINFORM with a Subform1 which has another subform2.

    I want to copy the 'PORT_ID' field from subform2 and paste it to MAINFORM field called 'PORTA'.

    I was thinking of having a button in subform2 which would copy and paste all at once.
    To Reference the Field in the Sub-Sub-Form from the Main Form:
    Code:
    Me![PORTA] = Forms!MAINFORM!Subform1.Form!Subform2.Form![PORT_ID]

    Comment

    • NewtoAccess
      New Member
      • May 2007
      • 32

      #3
      Thank you for the reply!
      Comand works exactly as expected when I add the button to the 'MAINFORM'.
      But I would like the button placed in Subform2 and have it work the same way.
      Possible?

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by NewtoAccess
        Thank you for the reply!
        Comand works exactly as expected when I add the button to the 'MAINFORM'.
        But I would like the button placed in Subform2 and have it work the same way.
        Possible?
        Code:
        Forms!MAINFORM![PORTA] = Me![PORT_ID]
                        OR
        Me.Parent.Parent![PORTA] = Me![PORT_ID]

        Comment

        • NewtoAccess
          New Member
          • May 2007
          • 32

          #5
          Thanks works Great.
          Now im working on Highlighting the entire record when clicking that same button.

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #6
            Originally posted by NewtoAccess
            Thanks works Great.
            Now im working on Highlighting the entire record when clicking that same button.
            Good for you! You won't be NewToAccess for long!

            Comment

            Working...