In the After_Update event I am just going to force DoCmd.GoToRecord , ,
acNext ito go to another record so the fields will populate correctly.
For
some reason it just would not update. Thanks for all your help Gina and
Karl.
Kelly
:
Then try the below on you main form in the After_Update of the field
that
gets updated...
Forms![YourSubform]![YourField].Requery
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
Thanks for the reply Gina I found out this did not work either. The
PercentageOfFill is on the main form and the NumberOfConductors is
in
the
subform. The requery I'm not familiar with how it works could I
maybe
use
the
next field in the tab order to force the requery that would then
update
the
PercentageOfFill in the main form without going to the next row?
It's
something about moving to another record that triggers the change.
Kelly
:
Kelly,
Have you tried putting in the After_Update event of
NumberOfConductors...
Me.PercentageOfFill.Requery
Of course that will only work if both fields are on the same
subform,
are
they?
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors
II
http://www.regina-whipp.com/index_files/TipList.htm
The texbox that triggers a change is NumberOfConductors in the
subform.
When
an input into this field is used it then calculates text box
SumOfConductorArea with a control source of
=Sum([SqIn]*[NumberOfConductors])
that is in the subform footer. This is then used in the text box
PercentageOfFill with a control source of
=CircuitDetailsubform!SumOfConductorArea/[AreaOfConduit]*100 that
is
located
in the main form. The problem is when you input the
NumberOfConductors
in
the
subform the PercentageOfFill will not update unless you more to
another
record. I hope this makes sense. Don't know which way to go with
this.
Kelly
:
I used this on the field that manipulates the calculated
field
in
the
mainform
I do not know VBA.
Where is the text box that needs the display refreshed - main or
sub?
Is this a bound object?
Where is the text box where you change data to trigger refresh -
main
or
sub?
Is this a bound object?
--
Build a little, test a little.
:
Karl,
I used this on the field that manipulates the calculated field
in
the
mainform but I still have to move to another record in the sub
form
to
get
the calculated field to update. Where am I going wrong?
Private Sub NumberOfConductors_LostFocus()
Me.NumberOfConductors.Requery
End Sub
Kelly
:
Use event Lost Focus to requery.
--
Build a little, test a little.
:
How can I get the calculated field to be updated without
moving
to
another
record or entering another selection in the subform. It
seems
to
lag behind.
Kelly