cant figure out what was wrong with this expression, some takes effect and some are not.WHY?
please need some help
This is from my query field.
DISCOUNT5%: IIf([m3]<="30" And [SCDiscount_Status]="2",[AMOUNTDUE]*0.05,0)
cant figure out what was wrong with this expression, some takes effect and some are not.WHY?
please need some help
This is from my query field.
DISCOUNT5%: IIf([m3]<="30" And [SCDiscount_Status]="2",[AMOUNTDUE]*0.05,0)
If field is number type, don't put parameters within quote marks.
Advise not to use special characters in field names. Better would be Discount5Pct.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
thanks sir it works..
Code:IIf( Nz([m3],0)<=30, IIf(Nz([SCDiscount_Status],0)=2, [AMOUNTDUE]*0.05,0) What must be returned, when Nz([m3])>30? )
it will return 0,
Then
OrCode:IIf(Nz([m3],0)<=30, IIf(Nz([SCDiscount_Status],0)=2, [AMOUNTDUE]*0.05,0),0)
Code:IIf(Nz([m3],0)<=30 AND Nz([SCDiscount_Status],0)=2, [AMOUNTDUE]*0.05,0)
Thanks sir it works