When do subforms update?

M

Maury Markowitz

I have a subform displaying details in a popup form (a form in a dialog
window that is). When the form is first opened the subform displays the
correct information, but if the user changes the key field (in this case,
accountId), the subform does not update.

I trapped out changes in the AfterUpdate and did
"Me.PositionSubform.Requery", but nothing happens.

Anyone know how to make this work?
 
M

Maury Markowitz

:

Sorry for the tardy reply, I should check a little more often.
Step 1: Add a combo box to the main form using the wizard, and select "look
up a record based on the combo box" (or whatever verbage says the same
thing), and have that combo box be used to select the account ID.
Step 2: Be sure the linked field between the main and sub forms is the
account ID.

This is exactly what I did actually. The accountId is bound to a combo that
the user does the selection on. However, changing the selection in the combo
has no effect on the subform.

The combo in question also has an afterUpdate on it, the subform isn't the
only thing that gets set when the user selects the account. Could this have
something to do with it?

Maury
 
M

Maury Markowitz

Ahhh, found it. You have to bind to the _control_ itself, not the value
inside the control. Kinda silly really, but I guess it tracks the updates
that way.

Maury
 
Top