OK Keith. I'll arrange further via PM in that case.
NeoPa:
Could my problem be that my [SumGWP], [Sum50GWP],
[SumNWP], [Sum50NWP], are Calculated Controls and are not Bound Controls. If I was to try to build a query to do the calculations and then bound the controls to that RecordSource, would make this problem go away? I am thinking that it should not make a difference. I was reading something I do not fully understand; that since my form is continous the many instances of this Control on the Continuous Form will display the same value in all instances....
Until you mentioned the Continuous Forms bit with the unbound controls, No.
After that it all started to make sense. Yes, if you have unbound controls on a continuous form you would certainly expect for those controls all to have the same data (In reality "All" is a misnomer as they are actually multiple displays of the same control).
The suggested solution of working them out in the query coming in to the form seems a workable and eminently sensible one.
A number of things spring to mind, although I wouldn't expect the effect you describe to be the result of any of them.
Sum(Nz([tblAllForecast. GWP],0)) should probably be Sum(Nz(tblAllFo recast.GWP,0))
In the query you are getting the data from a source of [tblAllForecast] whereas in the control it comes from [ReQryForecast].
In the query it's hard to determine whether the criteria is being applied before or after processing the data. It looks like it's after (SQL - HAVING) which makes little sense. The Control would be equivalent to a WHERE.
NB. You are calling the Nz() in the control AFTER the summing. In the query you are doing it before.
PS. When posting queries it's usually better to post the equivalent SQL rather than what is shown in the Query grid.
A number of things spring to mind, although I wouldn't expect the effect you describe to be the result of any of them.
Sum(Nz([tblAllForecast. GWP],0)) should probably be Sum(Nz(tblAllFo recast.GWP,0))
In the query you are getting the data from a source of [tblAllForecast] whereas in the control it comes from [ReQryForecast].
In the query it's hard to determine whether the criteria is being applied before or after processing the data. It looks like it's after (SQL - HAVING) which makes little sense. The Control would be equivalent to a WHERE.
NB. You are calling the Nz() in the control AFTER the summing. In the query you are doing it before.
PS. When posting queries it's usually better to post the equivalent SQL rather than what is shown in the Query grid.
To tell you the truth, this thing did work until somebody noticed the the calculations where reverting to the past when they clicked into another record row that was being displayed. It is almost like the Cache is not being cleared. Now I am trying to build a query that will perform the calculation, serve as the contol source, but in my mind I still am going to point the contol source to a query which, your right, I am was already pointing to ([ReQryForecast]). The only difference being that I won't have to do a Dsum? or Sum???
Because I have never done this before I must be me misunderstandin g how to point unbound controls based on a query (that perfoms calculations).
That doesn't seem right Keith. Binding and refreshing (or requerying) are two separate things.
I think you need to bind. That is to say you need to set the Control Source property to one of the fields returned by the underlying recordset (table or query).
That doesn't seem right Keith. Binding and refreshing (or requerying) are two separate things.
I think you need to bind. That is to say you need to set the Control Source property to one of the fields returned by the underlying recordset (table or query).
If I really knew what that meant, I am just relieved that the problem went away...... I think permanently. For now, I need to move on to other pressing issues. I can always double back when time allots.
Comment