Populate main form from subform record

Discussion in 'Access' started by howard_hong, Feb 11, 2017.

  1. howard_hong


    Feb 11, 2017
    Likes Received:

    In Access 2016, I have a main form, ClientInfoForm, which contains a subform, EditTransactions_subform. The subform is in datasheet view. When the user clicks a record in the subform, I want to populate fields in the main form. In the subform's Click event, I currently have:

    Public Sub Form_Click

    Forms![ClientInfoForm]![Amendment] = Forms![ClientInfoForm]![EditTransactions_subform].Form![Amendment]

    End Sub

    I am not sure if this is the right code to execute what I want. The name of the field is [Amendment] in both the subform and the main form.

    Thanks in advance for your help!

    howard_hong, Feb 11, 2017
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.