Refresh report calculated control (1 Viewer)

cpampas

Registered User.
Local time
Yesterday, 21:56
Joined
Jul 23, 2012
Messages
218
Hello

In the footer section of a countinous report I have a calculated field (mpreco)

=Sum([precoMaq])

When previewing the report the calculation doesnt show, but if I click on the control it will

i've tried on the format event and others to refresh the control
Me.mpreco.Requery

but still with no results, any thoughts ?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:56
Joined
May 7, 2009
Messages
19,233
some events doesn't fire on Report view.
you probably need to use continuous subform.
 

Ranman256

Well-known member
Local time
Today, 00:56
Joined
Apr 9, 2015
Messages
4,337
Summing a field that is null will give a null. (1 bad apple)
so, in the query , make sure you prevent null with NZ([field],0)
THEN you can sum.
 

cpampas

Registered User.
Local time
Yesterday, 21:56
Joined
Jul 23, 2012
Messages
218
Ranman, the query does not return any null values
Anyway I changed it to a countinous form, and again the same problem, but I noticed that when opening the form the calculations were displayed correctly, but when changing to design view and again to form view the calculations were not made ( I wonder why ??)
So, I placed on the open event of the form a me.requery, and it is working, I just do not understand the need for requering the source query that no parameters only fixed conditions retrieving data from a table.
 

cpampas

Registered User.
Local time
Yesterday, 21:56
Joined
Jul 23, 2012
Messages
218
humm, back with the problem again, this is disturbing
 

Users who are viewing this thread

Top Bottom