473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Calculated Controls- Recognizing change in value

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
1 3741
>
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Anonymous | last post by:
Hi all, I have a form people use to enter checking data. One of the fields is calculated based on finding the difference of two input fields on the form. Here are the fields: CheckAmount...
2
by: Paolo | last post by:
Friends, I have a table with a field named Initials which has its record source to another table named Initials. I would like to add on a form named Welcome two controls: A combo box, which...
2
by: Linda | last post by:
Hi, (Access 97) On my Menu form I have a button (cmdRefreshLinks) that refreshes/changes the linked tables in my database, and a calculated control (txtDataSource) that uses a custom function...
1
by: tconway | last post by:
I have an Access program that displays Customer data into a form and OrderID data into a subform. The totals in the Subform are based on calculated fields, i.e. the Total Amount field Calculates...
6
by: dhowell | last post by:
I have a "form" and "subform" where I would like a calculated control on the form which sums the values of a datasheet column of the subform. (datasheet on subform may have a variable number of...
1
by: kaosyeti | last post by:
is there an easy way to evaluate a calculated control step by step? i have a lot of long expressions in a lot of my controls and if there's an error, tracking it down is a PAIN. excel has a...
15
by: Jimmy Stewart | last post by:
I want to use a calculated function for the caption on my tab controls. I used the following code: Me.Page28.Caption = "Expenses & "]" This should display the following: " Expenses " where...
12
by: dkao99 | last post by:
I have two controls to show table field "Seconds" and calculated field "Hours". Is there a way to show the right "Hours" when "Seconds" got changed on form?
24
by: NaftoliGug | last post by:
Is there a way to have unbound, uncalculated controls (or a calculated control that is based on a function) that retains a different value for each record?
2
by: mkbrady | last post by:
I have a query that includes calculated fields that generate numeric results. I have wrapped conversion functions CLng() and CDdl() around the calculated fields to ensure the data types are...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.