Results 1 to 4 of 4
  1. #1
    jkk is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    9

    On click: Copy data from form field, open new form, paste data. Possible with macro?

    I have a button on a form, with a macro assigned to OpenForm. I'd like the macro to accomplish several additional actions. Here are all the actions, in order, that I want the macro to accomplish when the button is clicked:



    1. Copy data from "Field A" of the presently open form.
    2. Copy data from "Field B" of the presently open form.
    3. Open another form. (This function is already assigned to the macro.)
    4. Paste the "Field A" data into a particular field, in the newly opened form.
    5. Paste the "Field B" data, etc.

    Is it possible to accomplish these actions with a macro?

    Thanks,
    jkk

  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
    Yes, open the form and then use SetValue or SetProperty to copy the values.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jkk is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    9
    SetValue worked! Thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Copy/paste/rename a field in the same form?
    By Jamesiv1 in forum Access
    Replies: 5
    Last Post: 04-26-2014, 10:22 AM
  2. Copy and Paste in right click menu
    By chriscardwell06 in forum Access
    Replies: 1
    Last Post: 12-27-2013, 09:15 AM
  3. Replies: 2
    Last Post: 03-10-2013, 01:03 AM
  4. Replies: 1
    Last Post: 08-24-2012, 06:50 AM
  5. Copy and Paste Data Into an Indexed Table
    By CLT49er in forum Import/Export Data
    Replies: 1
    Last Post: 01-05-2012, 03:47 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