Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated fields in a detail section... Is it possible?

Status
Not open for further replies.

BrazilTechie

Programmer
Joined
Nov 13, 2002
Messages
88
Location
BR
Hi all:

I wonder if I could include a calculated field in a detail area. Such as =Sum([COMMISSION]+[OTHER]) included in a unbound field.
I am trying and I am not being successful.
Could it be because I am grouping records by salesperson?

Any help will be appreciated.
 
are you including the fields you are basing the calculation on in the detail section?
 
Yes I am. The two fields I mentioned previously.
 
Hi as long as the two fields are number/currency your control source should be =[COMMISSION]+[OTHER]
 
Thanks everyone for your response.

I figured out why it was not working. I was not checking for a NULL in the field.

=(IIf(IsNull([COMMISSION]),0,([COMMISSION]+(IIf(IsNull([OTHER]),0,[OTHER])))))))

The above code took care of my problem.

Thanks again guys.

BrazilTechie
 
Ah yes, the elusive null. I always get into trouble with that. Good work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top