Populate main form from subform record


Joined
Feb 11, 2017
Messages
1
Reaction score
0
Hello,

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top