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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating field based on the value of another field

Status
Not open for further replies.

aug4570

Technical User
Jul 6, 2000
74
US
Hello,

Just wondered how to calculate the value of one field based on the value of another. Example: If Field1 value is 'A' then Field2's value is 5%(Field3 + Field4). If Field1 value is 'B' then Field2's value is just 5% of Field3.

Thanks for the help
 
use iif

iif(field1 = 'A',0.05*(field3+field4),
iif(field1 = 'B', 0.05*field3),4711)

What should it be if field1 is neither A or B? I put 4711 for that case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top