Calling a method in a subform's parent form?

M

Maury Markowitz

I have a tabControl embedded in a form. The tabControl has a subform
in it. I would like to set the value of a field in the "parent" form
when the user double-clicks in a field in the subform. I'm sure this
is a simple syntax error, but this doesn't work:

Private Sub TickerField_DblClick(Cancel As Integer)
Parent.Form.accountId = Me.accountId
Call Forms("Main Screen").accountId_AfterUpdate
End Sub

The first line works as expected, and the parent form's field is set
properly. However, I then have to run some utility code to set various
other fields based on it, and I can't get the syntax of the call
right.

Maury
 

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