subforms help

C

Chad

I have a subform embedded into a form. These forms are linked on 5 child
fields. When I update these fields on the parent form, the subform does not
show the data that I need.

If I open the subform seperately (as a form all in itself) the data shows up
fine. So I guess the problem is that it is not refreshing once I change the
data in the parent form. I have tried to reference the subform in code and
use the refresh and/or requery commands but Access says that it cannot find
the form. Any help would be greatly appreciated.

Thanks,
Chad
 
J

Judi B

Hi Chad,

You're wanting to write your code in the parent, as the subform may not even
exist yet. You might consider a Refresh Page on AfterUpdate when updating
parent fields. Considering you have multiple fields, you may wish to write a
function & call where needed.

Here is an event procedure for you, where FIELD is your field.

Private Sub FIELD_AfterUpdate()
DoCmd.RunCommand acCmdRefreshPage

End Sub

hth

Judi B
 

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