Results 1 to 2 of 2
  1. #1
    Eddy Sincere is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Location
    Carson City, NV
    Posts
    114

    Copy information in a record to a new record

    I have a form which utilizes a subform (continuous). I want to copy the information in the current fields into a new record. I am using a the following VBA to copy the information on the primary form and it is working just fine (thanks Linq).

    Private Sub cmdCpy_Click()

    Dim cboSpplr As String
    Dim cboItmNmbr As String

    'Copy fields to variables
    cboSpplr = Me.cboSpplr
    cboItmNmbr = Me.cboItmNmbr

    'Go to a new record
    DoCmd.GoToRecord , , acNewRec

    'Reverse the process and plug old values into new record
    Me.cboSpplr = cboSpplr


    Me.cboItmNmbr = cboItmNmbr

    End Sub


    However, there is information I want copied over from the subform. What would the VBA look like?

    Subform name: frmFAI02
    Filed name: cboCrts

  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,652
    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. Replies: 1
    Last Post: 04-11-2015, 10:31 AM
  2. Replies: 2
    Last Post: 09-17-2014, 04:55 PM
  3. Replies: 14
    Last Post: 11-20-2013, 11:27 PM
  4. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  5. Replies: 3
    Last Post: 03-09-2013, 10:39 AM

Tags for this Thread

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