Recalculate fields in a subform.

  • Thread starter turks67 via AccessMonster.com
  • Start date
T

turks67 via AccessMonster.com

Is it possible to update the fields on a subform from a command buttom on the
main form?
I'm trying to recalulate the fields on a subform if someone changes the
numbers.
 
J

John W. Vinson

Is it possible to update the fields on a subform from a command buttom on the
main form?
I'm trying to recalulate the fields on a subform if someone changes the
numbers.

Sure. This can probably be done with a macro, but the VBA code would be

Private Sub RecalcMySub_Click()
Me!subformname.Form.Recalc
End Sub

where subformname is the name of the subform control (not necessarily the same
as the name of the form object within that control).

Depending on the nature of the changes you may need to use the .Refresh
method, or possibly two lines, a refresh followed by a recalc.
 

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