By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

Calculated Controls- Recognizing change in value

P: n/a
How do you recognize a change in the value of a calculated control?
The normal events such as Dirty don't seem to work, unless I
physically interact with the control in some way.

My problem is this, I have several contols which provide subtotals
from 10 forms. When a value in one of these forms is changed, which
updates the control value, I want it to requery a the record source of
another (11th) subform.

I've tried requerying the data in the 11th form by using the Dirty
event on each of the 10 forms, the problem is that the query runs
behind the change. In other words, the query only picks up the change
after a second change is made. None of the other events seems to work.

I created a recalc button on the form to manually requery the data but
would like the updates to be seemless.

The trigger is a change to in the value of the caclulated control but
I can't seem to get the application to recognize a change has occured.

Thanks.

J.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>
The trigger is a change to in the value of the caclulated control but
I can't seem to get the application to recognize a change has occured.


No, the trigger that changes things is when some value is changed. So, the
only solution here is to fire the re-query of this summary form when data is
changed.

it is not clear how/where/when the data on the other forms is changed.

Assuming it is a number field, then you likely need to force the data to be
saved...so the total on that one form updates...you then need to tell that
11th summary form that is happened.

So, assuming we have a field called PayAmount, you would have to put code in
the after update event.
Me.Refresh
Me.Myform11.Requery
The above refresh will force a disk write, and then any sum values will
update on that form. We then re-query the 11th form to show this fact.

So, the trigger is when someone changes a value. If the records or data is
going to be saved on those other forms...then you could use the forms after
update event, and not the actual field(s) after update event on the form(s)
to trigger the 11th form requery.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.