Forcing absolute values in a report

Mcgrco

Registered User.
Local time
Today, 00:21
Joined
Jun 19, 2001
Messages
118
i need to force absolute vales on the detail part of a report. That is how its displayed on the summary table. The report is based on a query which reverse the signs of one of the two lines in the summary table. This done so that the sum opn the report footer will actually be the net ie first line minus the second line.
I dont want to have to write a function for each of the fields on the .

Can anyone help
 
Your question is somewhat confusing. You need the data to be signed if you want it to sum properly. You can try using the Abs() function in the report to show only positive values. I don't think this will affect the summing but be sure to check.

Put the following (changing the field name of course) in the recordsource of the control that you want to show only positve numbers.

=Abs(YourField)
 
Thanks but I still cant get it to work.

In the Control source of one of the fields on the report I have chaged its value from
Demand to =Abs([Demand]). This produces an #error on the report.

Any suggestions
 
For those of you who are curious to know why deleting the control worked, it is because the original control name was the same as the name of a field from the form's recordsource. In this case, they were both named "Demand". When the report wizard generates a report, it uses the field names from the bound recordsource as control names. This doesn't normally cause a problem. However, once the controlsource was changed to a "calculation" so that the control was no longer bound to the recordsource, Access had a conflict. Changing the control name to txtDemand or anything else would also have worked.
 

Users who are viewing this thread

Back
Top Bottom