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!

HELP! calculating minimum charges 1

Status
Not open for further replies.

RJL1

Technical User
Oct 3, 2002
228
US
I got a report that list all of the product received. It has the following fields

order_no
description
prod_weight
qty_received
qty_order
recv_weight (qty_received * prod_weight)
charges (recv_weight * 6.4998 / 100)

We have a minimum charge of .65. I need to set the charges field in the report to reflect this, so if

charges < .65 then make it .65
charges >= .65 then do nothing
charges = 0 (did not received) then leave at 0

I'm new to VBA but can manage
Thanks in advance for any help with this

RJL1
 
iif( charges = 0, 0, iif( charges < .65 , .65, charges))

Regards
Warwick
 
That worked like a charm. I was using the IIF function but just with the <.65 part I did not know you could nest 2 of them.

Thanks
Ricardo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top