Results 1 to 2 of 2
  1. #1
    GregShah is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Canton, Ohio
    Posts
    60

    Optional Copy of Record from Form to Subform

    I am working on a form/subform. The form has a field called Sales Order which is simply a five digit number. The subform has a field call Job Number. Ninety percent of the time, these two fields are the same. Is there an easy way to have the value of the Sales Order automatically copy to the Job Number record on the subform?



    Occaisionally, I need to add a suffix letter to the Job Number when a project has multiple phases so I will need the ability to override this process for certain circumstances.

    Thanks for the help,

    Greg

  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
    In the appropriate event (after insert maybe, or the after update event of another textbox):

    Me.JobNumber = Forms!MainFormName.SalesOrder

    using the appropriate names.

    Edit: You can add a test to only set the value if the textbox is empty.
    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 a Record in a Datasheet Subform
    By Bentley in forum Forms
    Replies: 2
    Last Post: 09-05-2017, 12:26 PM
  2. Copy and Paste a Record in a subform
    By Joakim N in forum Programming
    Replies: 3
    Last Post: 10-30-2016, 12:41 PM
  3. Replies: 1
    Last Post: 02-25-2016, 01:39 PM
  4. Replies: 2
    Last Post: 10-23-2012, 12:18 PM
  5. Copy all record from subform
    By geniussam4u in forum Programming
    Replies: 4
    Last Post: 02-10-2012, 12:12 AM

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